gluegen-rt

16:35:58.868 INFO  jd.cli.Main - Decompiling gluegen-rt.jar
package com.jogamp.common;

import com.jogamp.common.util.JogampVersion;
import com.jogamp.common.util.VersionUtil;
import java.io.PrintStream;
import java.util.jar.Manifest;

public class GlueGenVersion
  extends JogampVersion
{
  protected static volatile GlueGenVersion jogampCommonVersionInfo;
  
  protected GlueGenVersion(String paramString, Manifest paramManifest)
  {
    super(paramString, paramManifest);
  }
  
  public static GlueGenVersion getInstance()
  {
    if (null == jogampCommonVersionInfo) {
      synchronized (GlueGenVersion.class)
      {
        if (null == jogampCommonVersionInfo)
        {
          Manifest localManifest = VersionUtil.getManifest(GlueGenVersion.class.getClassLoader(), "com.jogamp.common");
          if (null != localManifest)
          {
            jogampCommonVersionInfo = new GlueGenVersion("com.jogamp.common", localManifest);
          }
          else
          {
            localManifest = VersionUtil.getManifest(GlueGenVersion.class.getClassLoader(), "com.jogamp.gluegen");
            jogampCommonVersionInfo = new GlueGenVersion("com.jogamp.gluegen", localManifest);
          }
        }
      }
    }
    return jogampCommonVersionInfo;
  }
  
  public static void main(String[] paramArrayOfString)
  {
    System.err.println(VersionUtil.getPlatformInfo());
    System.err.println(getInstance());
  }
}

/* Location:
 * Qualified Name:     com.jogamp.common.GlueGenVersion
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.jogamp.common;

public class JogampRuntimeException
  extends RuntimeException
{
  public JogampRuntimeException() {}
  
  public JogampRuntimeException(String paramString)
  {
    super(paramString);
  }
  
  public JogampRuntimeException(String paramString, Throwable paramThrowable)
  {
    super(paramString, paramThrowable);
  }
  
  public JogampRuntimeException(Throwable paramThrowable)
  {
    super(paramThrowable);
  }
}

/* Location:
 * Qualified Name:     com.jogamp.common.JogampRuntimeException
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.jogamp.common.jvm;

import com.jogamp.common.util.PropertyAccess;
import java.io.PrintStream;
import java.lang.reflect.Method;
import java.security.PrivilegedAction;
import jogamp.common.Debug;

final class JNILibLoaderBase$1
  implements PrivilegedAction<Method>
{
  public Method run()
  {
    boolean bool = Debug.getBooleanProperty("sun.jnlp.applet.launcher", true);
    
    Class localClass = null;
    Method localMethod = null;
    if (bool)
    {
      try
      {
        localClass = Class.forName("org.jdesktop.applet.util.JNLPAppletLauncher");
      }
      catch (ClassNotFoundException localClassNotFoundException1)
      {
        System.err.println("JNILibLoaderBase: <org.jdesktop.applet.util.JNLPAppletLauncher> not found, despite enabled property <sun.jnlp.applet.launcher>, JNLPAppletLauncher was probably used before");
        System.setProperty("sun.jnlp.applet.launcher", Boolean.FALSE.toString());
      }
      catch (LinkageError localLinkageError)
      {
        throw localLinkageError;
      }
      if (null != localClass) {
        try
        {
          localMethod = localClass.getDeclaredMethod("loadLibrary", new Class[] { String.class });
        }
        catch (NoSuchMethodException localNoSuchMethodException1)
        {
          if (JNILibLoaderBase.DEBUG) {
            localNoSuchMethodException1.printStackTrace();
          }
          localClass = null;
        }
      }
    }
    if (null == localClass)
    {
      String str = PropertyAccess.getProperty("jnlp.launcher.class", false, null);
      if (null != str) {
        try
        {
          localClass = Class.forName(str);
          localMethod = localClass.getDeclaredMethod("loadLibrary", new Class[] { String.class });
        }
        catch (ClassNotFoundException localClassNotFoundException2)
        {
          if (JNILibLoaderBase.DEBUG) {
            localClassNotFoundException2.printStackTrace();
          }
        }
        catch (NoSuchMethodException localNoSuchMethodException2)
        {
          if (JNILibLoaderBase.DEBUG) {
            localNoSuchMethodException2.printStackTrace();
          }
          localClass = null;
        }
      }
    }
    return localMethod;
  }
}

/* Location:
 * Qualified Name:     com.jogamp.common.jvm.JNILibLoaderBase.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.jogamp.common.jvm;

import java.io.PrintStream;

class JNILibLoaderBase$DefaultAction
  implements JNILibLoaderBase.LoaderAction
{
  public boolean loadLibrary(String paramString, boolean paramBoolean, ClassLoader paramClassLoader)
  {
    boolean bool = true;
    if (!JNILibLoaderBase.isLoaded(paramString)) {
      try
      {
        JNILibLoaderBase.access$000(paramString, paramClassLoader);
        JNILibLoaderBase.addLoaded(paramString);
        if (JNILibLoaderBase.DEBUG) {
          System.err.println("JNILibLoaderBase: loaded " + paramString);
        }
      }
      catch (UnsatisfiedLinkError localUnsatisfiedLinkError)
      {
        bool = false;
        if (JNILibLoaderBase.DEBUG) {
          localUnsatisfiedLinkError.printStackTrace();
        }
        if ((!paramBoolean) && (localUnsatisfiedLinkError.getMessage().indexOf("already loaded") < 0)) {
          throw localUnsatisfiedLinkError;
        }
      }
    }
    return bool;
  }
  
  public void loadLibrary(String paramString, String[] paramArrayOfString, boolean paramBoolean, ClassLoader paramClassLoader)
  {
    if (!JNILibLoaderBase.isLoaded(paramString))
    {
      if (null != paramArrayOfString) {
        for (int i = 0; i < paramArrayOfString.length; i++) {
          loadLibrary(paramArrayOfString[i], paramBoolean, paramClassLoader);
        }
      }
      loadLibrary(paramString, false, paramClassLoader);
    }
  }
}

/* Location:
 * Qualified Name:     com.jogamp.common.jvm.JNILibLoaderBase.DefaultAction
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.jogamp.common.jvm;

public abstract interface JNILibLoaderBase$LoaderAction
{
  public abstract boolean loadLibrary(String paramString, boolean paramBoolean, ClassLoader paramClassLoader);
  
  public abstract void loadLibrary(String paramString, String[] paramArrayOfString, boolean paramBoolean, ClassLoader paramClassLoader);
}

/* Location:
 * Qualified Name:     com.jogamp.common.jvm.JNILibLoaderBase.LoaderAction
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.jogamp.common.jvm;

import com.jogamp.common.os.NativeLibrary;
import com.jogamp.common.util.JarUtil;
import com.jogamp.common.util.PropertyAccess;
import com.jogamp.common.util.cache.TempJarCache;
import java.io.IOException;
import java.io.PrintStream;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.net.URL;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.Arrays;
import java.util.HashSet;
import jogamp.common.Debug;
import jogamp.common.os.PlatformPropsImpl;

public class JNILibLoaderBase
{
  public static final boolean DEBUG = Debug.debug("JNILibLoader");
  
  private static class DefaultAction
    implements JNILibLoaderBase.LoaderAction
  {
    public boolean loadLibrary(String paramString, boolean paramBoolean, ClassLoader paramClassLoader)
    {
      boolean bool = true;
      if (!JNILibLoaderBase.isLoaded(paramString)) {
        try
        {
          JNILibLoaderBase.loadLibraryInternal(paramString, paramClassLoader);
          JNILibLoaderBase.addLoaded(paramString);
          if (JNILibLoaderBase.DEBUG) {
            System.err.println("JNILibLoaderBase: loaded " + paramString);
          }
        }
        catch (UnsatisfiedLinkError localUnsatisfiedLinkError)
        {
          bool = false;
          if (JNILibLoaderBase.DEBUG) {
            localUnsatisfiedLinkError.printStackTrace();
          }
          if ((!paramBoolean) && (localUnsatisfiedLinkError.getMessage().indexOf("already loaded") < 0)) {
            throw localUnsatisfiedLinkError;
          }
        }
      }
      return bool;
    }
    
    public void loadLibrary(String paramString, String[] paramArrayOfString, boolean paramBoolean, ClassLoader paramClassLoader)
    {
      if (!JNILibLoaderBase.isLoaded(paramString))
      {
        if (null != paramArrayOfString) {
          for (int i = 0; i < paramArrayOfString.length; i++) {
            loadLibrary(paramArrayOfString[i], paramBoolean, paramClassLoader);
          }
        }
        loadLibrary(paramString, false, paramClassLoader);
      }
    }
  }
  
  private static final HashSet<String> loaded = new HashSet();
  private static LoaderAction loaderAction = new DefaultAction(null);
  private static final Method customLoadLibraryMethod;
  
  public static boolean isLoaded(String paramString)
  {
    return loaded.contains(paramString);
  }
  
  public static void addLoaded(String paramString)
  {
    loaded.add(paramString);
    if (DEBUG) {
      System.err.println("JNILibLoaderBase: Loaded Native Library: " + paramString);
    }
  }
  
  public static void disableLoading()
  {
    setLoadingAction(null);
  }
  
  public static void enableLoading()
  {
    setLoadingAction(new DefaultAction(null));
  }
  
  public static synchronized void setLoadingAction(LoaderAction paramLoaderAction)
  {
    loaderAction = paramLoaderAction;
  }
  
  static final boolean addNativeJarLibsImpl(Class<?> paramClass, URL paramURL, String paramString, StringBuilder paramStringBuilder)
    throws IOException, IllegalArgumentException, SecurityException
  {
    paramStringBuilder.setLength(0);
    paramStringBuilder.append("addNativeJarLibsImpl(classFromJavaJar ").append(paramClass).append(", classJarURL ").append(paramURL).append(", nativeJarBaseName ").append(paramString).append("): ");
    boolean bool = false;
    if (TempJarCache.isInitialized())
    {
      String str = paramString + "-natives-" + PlatformPropsImpl.os_and_arch + ".jar";
      paramStringBuilder.append(str);
      URL localURL1 = JarUtil.getURLDirname(JarUtil.getJarSubURL(paramURL));
      paramStringBuilder.append(" + ").append(localURL1);
      URL localURL2 = JarUtil.getJarFileURL(localURL1, str);
      paramStringBuilder.append(" -> ").append(localURL2);
      if (DEBUG) {
        System.err.println(paramStringBuilder.toString());
      }
      TempJarCache.addNativeLibs(paramClass, localURL2);
      bool = true;
    }
    return bool;
  }
  
  public static final boolean addNativeJarLibs(Class<?> paramClass, String paramString)
  {
    if (TempJarCache.isInitialized())
    {
      StringBuilder localStringBuilder = new StringBuilder();
      try
      {
        URL localURL = JarUtil.getJarURL(paramClass.getName(), paramClass.getClassLoader());
        return addNativeJarLibsImpl(paramClass, localURL, paramString, localStringBuilder);
      }
      catch (Exception localException)
      {
        System.err.println("Catched " + localException.getClass().getSimpleName() + ": " + localException.getMessage() + ", while " + localStringBuilder.toString());
        if (DEBUG) {
          localException.printStackTrace();
        }
      }
    }
    else if (DEBUG)
    {
      System.err.println("JNILibLoaderBase: addNativeJarLibs1: disabled due to uninitialized TempJarCache");
    }
    return false;
  }
  
  public static boolean addNativeJarLibs(Class<?>[] paramArrayOfClass, String paramString, String[] paramArrayOfString)
  {
    if (DEBUG) {
      System.err.println("JNILibLoaderBase: addNativeJarLibs0(classesFromJavaJars " + Arrays.asList(paramArrayOfClass) + ", singleJarMarker " + paramString + ", stripBasenameSuffixes " + (null != paramArrayOfString ? Arrays.asList(paramArrayOfString) : "none"));
    }
    boolean bool = false;
    if (TempJarCache.isInitialized())
    {
      StringBuilder localStringBuilder = new StringBuilder();
      int i = 0;
      try
      {
        int j = 0;
        bool = true;
        for (int k = 0; (j == 0) && (bool) && (k < paramArrayOfClass.length) && (null != paramArrayOfClass[k]); k++)
        {
          ClassLoader localClassLoader = paramArrayOfClass[k].getClassLoader();
          URL localURL = JarUtil.getJarURL(paramArrayOfClass[k].getName(), localClassLoader);
          String str1 = JarUtil.getJarBasename(localURL);
          bool = null != str1;
          if (bool)
          {
            String str2 = str1.substring(0, str1.indexOf(".jar"));
            String str3 = stripName(str2, paramArrayOfString);
            j = (null != paramString) && (str2.indexOf(paramString) >= 0) ? 1 : 0;
            bool = addNativeJarLibsImpl(paramArrayOfClass[k], localURL, str3, localStringBuilder);
            if (bool) {
              i++;
            }
            if ((DEBUG) && (j != 0)) {
              System.err.println("JNILibLoaderBase: addNativeJarLibs0: end after all-in-one JAR: " + str2);
            }
          }
        }
      }
      catch (Exception localException)
      {
        System.err.println("Catched " + localException.getClass().getSimpleName() + ": " + localException.getMessage() + ", while " + localStringBuilder.toString());
        if (DEBUG) {
          localException.printStackTrace();
        }
        bool = false;
      }
      if (DEBUG) {
        System.err.println("JNILibLoaderBase: addNativeJarLibs0(..) done, count " + i + ", ok " + bool);
      }
    }
    else if (DEBUG)
    {
      System.err.println("JNILibLoaderBase: addNativeJarLibs0: disabled due to uninitialized TempJarCache");
    }
    return bool;
  }
  
  private static final String stripName(String paramString, String[] paramArrayOfString)
  {
    if (null != paramArrayOfString) {
      for (int i = 0; (i < paramArrayOfString.length) && (null != paramArrayOfString[i]); i++)
      {
        int j = paramString.indexOf(paramArrayOfString[i]);
        if (0 < j) {
          return paramString.substring(0, j);
        }
      }
    }
    return paramString;
  }
  
  protected static synchronized boolean loadLibrary(String paramString, boolean paramBoolean, ClassLoader paramClassLoader)
  {
    if (loaderAction != null) {
      return loaderAction.loadLibrary(paramString, paramBoolean, paramClassLoader);
    }
    return false;
  }
  
  protected static synchronized void loadLibrary(String paramString, String[] paramArrayOfString, boolean paramBoolean, ClassLoader paramClassLoader)
  {
    if (loaderAction != null) {
      loaderAction.loadLibrary(paramString, paramArrayOfString, paramBoolean, paramClassLoader);
    }
  }
  
  static
  {
    Method localMethod = (Method)AccessController.doPrivileged(new PrivilegedAction()
    {
      public Method run()
      {
        boolean bool = Debug.getBooleanProperty("sun.jnlp.applet.launcher", true);
        
        Class localClass = null;
        Method localMethod = null;
        if (bool)
        {
          try
          {
            localClass = Class.forName("org.jdesktop.applet.util.JNLPAppletLauncher");
          }
          catch (ClassNotFoundException localClassNotFoundException1)
          {
            System.err.println("JNILibLoaderBase: <org.jdesktop.applet.util.JNLPAppletLauncher> not found, despite enabled property <sun.jnlp.applet.launcher>, JNLPAppletLauncher was probably used before");
            System.setProperty("sun.jnlp.applet.launcher", Boolean.FALSE.toString());
          }
          catch (LinkageError localLinkageError)
          {
            throw localLinkageError;
          }
          if (null != localClass) {
            try
            {
              localMethod = localClass.getDeclaredMethod("loadLibrary", new Class[] { String.class });
            }
            catch (NoSuchMethodException localNoSuchMethodException1)
            {
              if (JNILibLoaderBase.DEBUG) {
                localNoSuchMethodException1.printStackTrace();
              }
              localClass = null;
            }
          }
        }
        if (null == localClass)
        {
          String str = PropertyAccess.getProperty("jnlp.launcher.class", false, null);
          if (null != str) {
            try
            {
              localClass = Class.forName(str);
              localMethod = localClass.getDeclaredMethod("loadLibrary", new Class[] { String.class });
            }
            catch (ClassNotFoundException localClassNotFoundException2)
            {
              if (JNILibLoaderBase.DEBUG) {
                localClassNotFoundException2.printStackTrace();
              }
            }
            catch (NoSuchMethodException localNoSuchMethodException2)
            {
              if (JNILibLoaderBase.DEBUG) {
                localNoSuchMethodException2.printStackTrace();
              }
              localClass = null;
            }
          }
        }
        return localMethod;
      }
    });
    customLoadLibraryMethod = localMethod;
  }
  
  private static void loadLibraryInternal(String paramString, ClassLoader paramClassLoader)
  {
    if ((null != customLoadLibraryMethod) && (!paramString.equals("jawt")))
    {
      try
      {
        customLoadLibraryMethod.invoke(null, new Object[] { paramString });
      }
      catch (Exception localException)
      {
        Object localObject = localException;
        if ((localObject instanceof InvocationTargetException)) {
          localObject = ((InvocationTargetException)localObject).getTargetException();
        }
        if ((localObject instanceof Error)) {
          throw ((Error)localObject);
        }
        if ((localObject instanceof RuntimeException)) {
          throw ((RuntimeException)localObject);
        }
        throw ((UnsatisfiedLinkError)new UnsatisfiedLinkError("can not load library " + paramString).initCause(localException));
      }
    }
    else
    {
      String str = NativeLibrary.findLibrary(paramString, paramClassLoader);
      if (DEBUG) {
        System.err.print("JNILibLoaderBase: loadLibraryInternal(" + paramString + "): CL: " + str);
      }
      if (null != str)
      {
        if (DEBUG) {
          System.err.println(" -> System.load(" + str + ")");
        }
        System.load(str);
      }
      else
      {
        if (DEBUG) {
          System.err.println(" -> System.loadLibrary(" + paramString + ")");
        }
        System.loadLibrary(paramString);
      }
    }
  }
  
  public static abstract interface LoaderAction
  {
    public abstract boolean loadLibrary(String paramString, boolean paramBoolean, ClassLoader paramClassLoader);
    
    public abstract void loadLibrary(String paramString, String[] paramArrayOfString, boolean paramBoolean, ClassLoader paramClassLoader);
  }
}

/* Location:
 * Qualified Name:     com.jogamp.common.jvm.JNILibLoaderBase
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.jogamp.common.net;

import java.io.IOException;
import java.net.JarURLConnection;
import java.net.URL;
import java.net.URLConnection;

public class AssetURLConnection
  extends PiggybackURLConnection<AssetURLContext>
{
  public AssetURLConnection(URL paramURL, AssetURLContext paramAssetURLContext)
  {
    super(paramURL, paramAssetURLContext);
  }
  
  public String getEntryName()
    throws IOException
  {
    if (!connected) {
      throw new IOException("not connected");
    }
    String str;
    if ((subConn instanceof JarURLConnection)) {
      str = ((JarURLConnection)subConn).getEntryName();
    } else {
      str = subConn.getURL().getPath();
    }
    if (str.startsWith("assets/")) {
      return str.substring("assets/".length());
    }
    return str;
  }
}

/* Location:
 * Qualified Name:     com.jogamp.common.net.AssetURLConnection
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.jogamp.common.net;

final class AssetURLContext$1
  extends AssetURLContext
{
  AssetURLContext$1(ClassLoader paramClassLoader) {}
  
  public ClassLoader getClassLoader()
  {
    return val$cl;
  }
}

/* Location:
 * Qualified Name:     com.jogamp.common.net.AssetURLContext.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.jogamp.common.net;

import com.jogamp.common.os.AndroidVersion;
import com.jogamp.common.util.IOUtil;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.PrintStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
import java.net.URLStreamHandler;

public abstract class AssetURLContext
  implements PiggybackURLContext
{
  private static final boolean DEBUG = IOUtil.DEBUG;
  public static final String asset_protocol = "asset";
  public static final String asset_protocol_prefix = "asset:";
  public static final String assets_folder = "assets/";
  
  public static AssetURLContext create(ClassLoader paramClassLoader)
  {
    new AssetURLContext()
    {
      public ClassLoader getClassLoader()
      {
        return val$cl;
      }
    };
  }
  
  public static AssetURLStreamHandler createHandler(ClassLoader paramClassLoader)
  {
    return new AssetURLStreamHandler(create(paramClassLoader));
  }
  
  public static URL createURL(String paramString, ClassLoader paramClassLoader)
    throws MalformedURLException
  {
    return new URL(null, "asset:" + paramString, createHandler(paramClassLoader));
  }
  
  public static URL createURL(String paramString)
    throws MalformedURLException
  {
    return new URL("asset:" + paramString);
  }
  
  public static URLStreamHandler getRegisteredHandler()
  {
    GenericURLStreamHandlerFactory localGenericURLStreamHandlerFactory = GenericURLStreamHandlerFactory.register();
    return null != localGenericURLStreamHandlerFactory ? localGenericURLStreamHandlerFactory.getHandler("asset") : null;
  }
  
  public static boolean registerHandler(ClassLoader paramClassLoader)
  {
    GenericURLStreamHandlerFactory localGenericURLStreamHandlerFactory = GenericURLStreamHandlerFactory.register();
    if (null != localGenericURLStreamHandlerFactory)
    {
      localGenericURLStreamHandlerFactory.setHandler("asset", createHandler(paramClassLoader));
      return true;
    }
    return false;
  }
  
  public abstract ClassLoader getClassLoader();
  
  public String getImplementedProtocol()
  {
    return "asset";
  }
  
  public URLConnection resolve(String paramString)
    throws IOException
  {
    return resolve(paramString, getClassLoader());
  }
  
  public static URLConnection resolve(String paramString, ClassLoader paramClassLoader)
    throws IOException
  {
    URL localURL = null;
    URLConnection localURLConnection = null;
    int i = -1;
    if (DEBUG) {
      System.err.println("AssetURLContext.resolve: <" + paramString + ">");
    }
    paramString = IOUtil.cleanPathString(paramString);
    try
    {
      localURL = new URL(paramString);
      localURLConnection = open(localURL);
      i = null != localURLConnection ? 1 : -1;
    }
    catch (MalformedURLException localMalformedURLException)
    {
      if (DEBUG) {
        System.err.println("ERR(0): " + localMalformedURLException.getMessage());
      }
    }
    Object localObject;
    if ((null == localURLConnection) && (null != paramClassLoader))
    {
      localObject = paramString;
      while (((String)localObject).startsWith("/")) {
        localObject = ((String)localObject).substring(1);
      }
      if (AndroidVersion.isAvailable) {
        localObject = "assets/" + (String)localObject;
      }
      localURL = paramClassLoader.getResource((String)localObject);
      localURLConnection = open(localURL);
      i = null != localURLConnection ? 2 : -1;
    }
    if (null == localURLConnection) {
      try
      {
        localObject = new File(paramString);
        if (((File)localObject).exists())
        {
          localURL = IOUtil.toURLSimple((File)localObject);
          localURLConnection = open(localURL);
          i = null != localURLConnection ? 3 : -1;
        }
      }
      catch (Throwable localThrowable)
      {
        if (DEBUG) {
          System.err.println("ERR(1): " + localThrowable.getMessage());
        }
      }
    }
    if (DEBUG) {
      System.err.println("AssetURLContext.resolve: type " + i + ": url <" + localURL + ">, conn <" + localURLConnection + ">, connURL <" + (null != localURLConnection ? localURLConnection.getURL() : null) + ">");
    }
    if (null == localURLConnection) {
      throw new FileNotFoundException("Could not look-up: " + paramString + " as URL, w/ ClassLoader or as File");
    }
    return localURLConnection;
  }
  
  private static URLConnection open(URL paramURL)
  {
    if (null == paramURL) {
      return null;
    }
    try
    {
      URLConnection localURLConnection = paramURL.openConnection();
      localURLConnection.connect();
      return localURLConnection;
    }
    catch (IOException localIOException)
    {
      if (DEBUG) {
        System.err.println("ERR: " + localIOException.getMessage());
      }
    }
    return null;
  }
}

/* Location:
 * Qualified Name:     com.jogamp.common.net.AssetURLContext
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.jogamp.common.net;

import java.io.IOException;
import java.net.URL;
import java.net.URLConnection;
import java.net.URLStreamHandler;

public class AssetURLStreamHandler
  extends URLStreamHandler
{
  AssetURLContext ctx;
  
  public AssetURLStreamHandler(AssetURLContext paramAssetURLContext)
  {
    ctx = paramAssetURLContext;
  }
  
  protected URLConnection openConnection(URL paramURL)
    throws IOException
  {
    AssetURLConnection localAssetURLConnection = new AssetURLConnection(paramURL, ctx);
    localAssetURLConnection.connect();
    return localAssetURLConnection;
  }
}

/* Location:
 * Qualified Name:     com.jogamp.common.net.AssetURLStreamHandler
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.jogamp.common.net;

import java.io.PrintStream;
import java.net.URL;
import java.security.PrivilegedAction;

final class GenericURLStreamHandlerFactory$1
  implements PrivilegedAction<GenericURLStreamHandlerFactory>
{
  public GenericURLStreamHandlerFactory run()
  {
    int i = 0;
    GenericURLStreamHandlerFactory localGenericURLStreamHandlerFactory = new GenericURLStreamHandlerFactory(null);
    try
    {
      URL.setURLStreamHandlerFactory(localGenericURLStreamHandlerFactory);
      i = 1;
    }
    catch (Throwable localThrowable)
    {
      System.err.println("GenericURLStreamHandlerFactory: Setting URLStreamHandlerFactory failed: " + localThrowable.getMessage());
    }
    return i != 0 ? localGenericURLStreamHandlerFactory : null;
  }
}

/* Location:
 * Qualified Name:     com.jogamp.common.net.GenericURLStreamHandlerFactory.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.jogamp.common.net;

import java.io.PrintStream;
import java.net.URL;
import java.net.URLStreamHandler;
import java.net.URLStreamHandlerFactory;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.HashMap;
import java.util.Map;

public class GenericURLStreamHandlerFactory
  implements URLStreamHandlerFactory
{
  private static GenericURLStreamHandlerFactory factory = null;
  private final Map<String, URLStreamHandler> protocolHandlers;
  
  private GenericURLStreamHandlerFactory()
  {
    protocolHandlers = new HashMap();
  }
  
  public final synchronized URLStreamHandler setHandler(String paramString, URLStreamHandler paramURLStreamHandler)
  {
    return (URLStreamHandler)protocolHandlers.put(paramString, paramURLStreamHandler);
  }
  
  public final synchronized URLStreamHandler getHandler(String paramString)
  {
    return (URLStreamHandler)protocolHandlers.get(paramString);
  }
  
  public final synchronized URLStreamHandler createURLStreamHandler(String paramString)
  {
    return getHandler(paramString);
  }
  
  public static synchronized GenericURLStreamHandlerFactory register()
  {
    if (null == factory) {
      factory = (GenericURLStreamHandlerFactory)AccessController.doPrivileged(new PrivilegedAction()
      {
        public GenericURLStreamHandlerFactory run()
        {
          int i = 0;
          GenericURLStreamHandlerFactory localGenericURLStreamHandlerFactory = new GenericURLStreamHandlerFactory(null);
          try
          {
            URL.setURLStreamHandlerFactory(localGenericURLStreamHandlerFactory);
            i = 1;
          }
          catch (Throwable localThrowable)
          {
            System.err.println("GenericURLStreamHandlerFactory: Setting URLStreamHandlerFactory failed: " + localThrowable.getMessage());
          }
          return i != 0 ? localGenericURLStreamHandlerFactory : null;
        }
      });
    }
    return factory;
  }
}

/* Location:
 * Qualified Name:     com.jogamp.common.net.GenericURLStreamHandlerFactory
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.jogamp.common.net;

import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.net.URLConnection;

public abstract class PiggybackURLConnection<I extends PiggybackURLContext>
  extends URLConnection
{
  protected URL subUrl;
  protected URLConnection subConn;
  protected I context;
  
  protected PiggybackURLConnection(URL paramURL, I paramI)
  {
    super(paramURL);
    context = paramI;
  }
  
  public synchronized void connect()
    throws IOException
  {
    if (!connected)
    {
      subConn = context.resolve(url.getPath());
      subUrl = subConn.getURL();
      connected = true;
    }
  }
  
  public InputStream getInputStream()
    throws IOException
  {
    if (!connected) {
      throw new IOException("not connected");
    }
    return subConn.getInputStream();
  }
  
  public abstract String getEntryName()
    throws IOException;
  
  public URL getSubProtocol()
    throws IOException
  {
    if (!connected) {
      throw new IOException("not connected");
    }
    return subUrl;
  }
}

/* Location:
 * Qualified Name:     com.jogamp.common.net.PiggybackURLConnection
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.jogamp.common.net;

import java.io.IOException;
import java.net.URLConnection;

public abstract interface PiggybackURLContext
{
  public abstract String getImplementedProtocol();
  
  public abstract URLConnection resolve(String paramString)
    throws IOException;
}

/* Location:
 * Qualified Name:     com.jogamp.common.net.PiggybackURLContext
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.jogamp.common.net.asset;

import com.jogamp.common.net.AssetURLContext;

final class Handler$1
  extends AssetURLContext
{
  public ClassLoader getClassLoader()
  {
    return Handler.class.getClassLoader();
  }
}

/* Location:
 * Qualified Name:     com.jogamp.common.net.asset.Handler.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.jogamp.common.net.asset;

import com.jogamp.common.net.AssetURLConnection;
import com.jogamp.common.net.AssetURLContext;
import java.io.IOException;
import java.net.URL;
import java.net.URLConnection;
import java.net.URLStreamHandler;

public class Handler
  extends URLStreamHandler
{
  static final AssetURLContext localCL = new AssetURLContext()
  {
    public ClassLoader getClassLoader()
    {
      return Handler.class.getClassLoader();
    }
  };
  
  protected URLConnection openConnection(URL paramURL)
    throws IOException
  {
    AssetURLConnection localAssetURLConnection = new AssetURLConnection(paramURL, localCL);
    localAssetURLConnection.connect();
    return localAssetURLConnection;
  }
}

/* Location:
 * Qualified Name:     com.jogamp.common.net.asset.Handler
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.jogamp.common.nio;

import com.jogamp.common.os.Platform;
import java.nio.Buffer;

public abstract class AbstractBuffer<B extends AbstractBuffer>
  implements NativeBuffer<B>
{
  protected final int elementSize;
  protected final Buffer buffer;
  protected int capacity;
  protected int position;
  
  protected AbstractBuffer(Buffer paramBuffer, int paramInt)
  {
    elementSize = paramInt;
    buffer = paramBuffer;
    
    capacity = paramBuffer.capacity();
    position = 0;
  }
  
  public final int elementSize()
  {
    return elementSize;
  }
  
  public final int limit()
  {
    return capacity;
  }
  
  public final int capacity()
  {
    return capacity;
  }
  
  public final int position()
  {
    return position;
  }
  
  public final B position(int paramInt)
  {
    if ((0 > paramInt) || (paramInt >= capacity)) {
      throw new IndexOutOfBoundsException("Sorry to interrupt, but the position " + paramInt + " was out of bounds. " + "My capacity is " + capacity() + ".");
    }
    position = paramInt;
    return this;
  }
  
  public final int remaining()
  {
    return capacity - position;
  }
  
  public final boolean hasRemaining()
  {
    return position < capacity;
  }
  
  public final B rewind()
  {
    position = 0;
    return this;
  }
  
  public final Buffer getBuffer()
  {
    return buffer;
  }
  
  public final boolean isDirect()
  {
    return buffer.isDirect();
  }
  
  public final boolean hasArray()
  {
    return buffer.hasArray();
  }
  
  public final int arrayOffset()
  {
    if (hasArray()) {
      return buffer.arrayOffset();
    }
    return 0;
  }
  
  public Object array()
    throws UnsupportedOperationException
  {
    return buffer.array();
  }
  
  public String toString()
  {
    return "AbstractBuffer[direct " + isDirect() + ", hasArray " + hasArray() + ", capacity " + capacity + ", position " + position + ", elementSize " + elementSize + ", buffer[capacity " + buffer.capacity() + ", lim " + buffer.limit() + ", pos " + buffer.position() + "]]";
  }
  
  static {}
}

/* Location:
 * Qualified Name:     com.jogamp.common.nio.AbstractBuffer
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.jogamp.common.nio;

import com.jogamp.common.util.ValueConv;
import java.nio.Buffer;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.CharBuffer;
import java.nio.DoubleBuffer;
import java.nio.FloatBuffer;
import java.nio.IntBuffer;
import java.nio.LongBuffer;
import java.nio.ShortBuffer;

public class Buffers
{
  public static final int SIZEOF_BYTE = 1;
  public static final int SIZEOF_SHORT = 2;
  public static final int SIZEOF_CHAR = 2;
  public static final int SIZEOF_INT = 4;
  public static final int SIZEOF_FLOAT = 4;
  public static final int SIZEOF_LONG = 8;
  public static final int SIZEOF_DOUBLE = 8;
  
  public static ByteBuffer newDirectByteBuffer(int paramInt)
  {
    return nativeOrder(ByteBuffer.allocateDirect(paramInt));
  }
  
  public static ByteBuffer newDirectByteBuffer(byte[] paramArrayOfByte, int paramInt1, int paramInt2)
  {
    return (ByteBuffer)newDirectByteBuffer(paramInt2).put(paramArrayOfByte, paramInt1, paramInt2).rewind();
  }
  
  public static ByteBuffer newDirectByteBuffer(byte[] paramArrayOfByte, int paramInt)
  {
    return newDirectByteBuffer(paramArrayOfByte, paramInt, paramArrayOfByte.length - paramInt);
  }
  
  public static ByteBuffer newDirectByteBuffer(byte[] paramArrayOfByte)
  {
    return newDirectByteBuffer(paramArrayOfByte, 0);
  }
  
  public static DoubleBuffer newDirectDoubleBuffer(int paramInt)
  {
    return newDirectByteBuffer(paramInt * 8).asDoubleBuffer();
  }
  
  public static DoubleBuffer newDirectDoubleBuffer(double[] paramArrayOfDouble, int paramInt1, int paramInt2)
  {
    return (DoubleBuffer)newDirectDoubleBuffer(paramInt2).put(paramArrayOfDouble, paramInt1, paramInt2).rewind();
  }
  
  public static DoubleBuffer newDirectDoubleBuffer(double[] paramArrayOfDouble, int paramInt)
  {
    return newDirectDoubleBuffer(paramArrayOfDouble, paramInt, paramArrayOfDouble.length - paramInt);
  }
  
  public static DoubleBuffer newDirectDoubleBuffer(double[] paramArrayOfDouble)
  {
    return newDirectDoubleBuffer(paramArrayOfDouble, 0);
  }
  
  public static FloatBuffer newDirectFloatBuffer(int paramInt)
  {
    return newDirectByteBuffer(paramInt * 4).asFloatBuffer();
  }
  
  public static FloatBuffer newDirectFloatBuffer(float[] paramArrayOfFloat, int paramInt1, int paramInt2)
  {
    return (FloatBuffer)newDirectFloatBuffer(paramInt2).put(paramArrayOfFloat, paramInt1, paramInt2).rewind();
  }
  
  public static FloatBuffer newDirectFloatBuffer(float[] paramArrayOfFloat, int paramInt)
  {
    return newDirectFloatBuffer(paramArrayOfFloat, paramInt, paramArrayOfFloat.length - paramInt);
  }
  
  public static FloatBuffer newDirectFloatBuffer(float[] paramArrayOfFloat)
  {
    return newDirectFloatBuffer(paramArrayOfFloat, 0);
  }
  
  public static IntBuffer newDirectIntBuffer(int paramInt)
  {
    return newDirectByteBuffer(paramInt * 4).asIntBuffer();
  }
  
  public static IntBuffer newDirectIntBuffer(int[] paramArrayOfInt, int paramInt1, int paramInt2)
  {
    return (IntBuffer)newDirectIntBuffer(paramInt2).put(paramArrayOfInt, paramInt1, paramInt2).rewind();
  }
  
  public static IntBuffer newDirectIntBuffer(int[] paramArrayOfInt, int paramInt)
  {
    return newDirectIntBuffer(paramArrayOfInt, paramInt, paramArrayOfInt.length - paramInt);
  }
  
  public static IntBuffer newDirectIntBuffer(int[] paramArrayOfInt)
  {
    return newDirectIntBuffer(paramArrayOfInt, 0);
  }
  
  public static LongBuffer newDirectLongBuffer(int paramInt)
  {
    return newDirectByteBuffer(paramInt * 8).asLongBuffer();
  }
  
  public static LongBuffer newDirectLongBuffer(long[] paramArrayOfLong, int paramInt1, int paramInt2)
  {
    return (LongBuffer)newDirectLongBuffer(paramInt2).put(paramArrayOfLong, paramInt1, paramInt2).rewind();
  }
  
  public static LongBuffer newDirectLongBuffer(long[] paramArrayOfLong, int paramInt)
  {
    return newDirectLongBuffer(paramArrayOfLong, paramInt, paramArrayOfLong.length - paramInt);
  }
  
  public static LongBuffer newDirectLongBuffer(long[] paramArrayOfLong)
  {
    return newDirectLongBuffer(paramArrayOfLong, 0);
  }
  
  public static ShortBuffer newDirectShortBuffer(int paramInt)
  {
    return newDirectByteBuffer(paramInt * 2).asShortBuffer();
  }
  
  public static ShortBuffer newDirectShortBuffer(short[] paramArrayOfShort, int paramInt1, int paramInt2)
  {
    return (ShortBuffer)newDirectShortBuffer(paramInt2).put(paramArrayOfShort, paramInt1, paramInt2).rewind();
  }
  
  public static ShortBuffer newDirectShortBuffer(short[] paramArrayOfShort, int paramInt)
  {
    return newDirectShortBuffer(paramArrayOfShort, paramInt, paramArrayOfShort.length - paramInt);
  }
  
  public static ShortBuffer newDirectShortBuffer(short[] paramArrayOfShort)
  {
    return newDirectShortBuffer(paramArrayOfShort, 0);
  }
  
  public static CharBuffer newDirectCharBuffer(int paramInt)
  {
    return newDirectByteBuffer(paramInt * 2).asCharBuffer();
  }
  
  public static CharBuffer newDirectCharBuffer(char[] paramArrayOfChar, int paramInt1, int paramInt2)
  {
    return (CharBuffer)newDirectCharBuffer(paramInt2).put(paramArrayOfChar, paramInt1, paramInt2).rewind();
  }
  
  public static CharBuffer newDirectCharBuffer(char[] paramArrayOfChar, int paramInt)
  {
    return newDirectCharBuffer(paramArrayOfChar, paramInt, paramArrayOfChar.length - paramInt);
  }
  
  public static CharBuffer newDirectCharBuffer(char[] paramArrayOfChar)
  {
    return newDirectCharBuffer(paramArrayOfChar, 0);
  }
  
  public static <B extends Buffer> B slice(B paramB)
  {
    if ((paramB instanceof ByteBuffer))
    {
      ByteBuffer localByteBuffer = (ByteBuffer)paramB;
      return localByteBuffer.slice().order(localByteBuffer.order());
    }
    if ((paramB instanceof IntBuffer)) {
      return ((IntBuffer)paramB).slice();
    }
    if ((paramB instanceof Sh
1 2 3 4 5 6 7 8 9 10 11 12

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2017. Infinite Loop Ltd