com.jogamp.common.util
Class IOUtil.ClassResources

java.lang.Object
  extended by com.jogamp.common.util.IOUtil.ClassResources
Enclosing class:
IOUtil

public static class IOUtil.ClassResources
extends Object

Helper compound associating a class instance and resource paths to be resolved at a later time.


Field Summary
 Class<?> contextCL
          Class instance used to resolve(int) the resourcePaths.
 String[] resourcePaths
          Resource paths, see resolve(int).
 
Constructor Summary
IOUtil.ClassResources(Class<?> contextCL, String[] resourcePaths)
           
 
Method Summary
 URLConnection resolve(int uriIndex)
          Resolving one of the resourcePaths indexed by uriIndex using contextCL and IOUtil.getResource(Class, String).
 int resourceCount()
          Returns the number of resources, i.e.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

contextCL

public final Class<?> contextCL
Class instance used to resolve(int) the resourcePaths.


resourcePaths

public final String[] resourcePaths
Resource paths, see resolve(int).

Constructor Detail

IOUtil.ClassResources

public IOUtil.ClassResources(Class<?> contextCL,
                             String[] resourcePaths)
Parameters:
contextCL - class instance to resolve(int) resourcePaths.
resourcePaths - array of strings denominating multiple resource paths. None shall be null.
Method Detail

resourceCount

public final int resourceCount()
Returns the number of resources, i.e. resourcePaths.length.


resolve

public URLConnection resolve(int uriIndex)
                      throws ArrayIndexOutOfBoundsException
Resolving one of the resourcePaths indexed by uriIndex using contextCL and IOUtil.getResource(Class, String).

Throws:
ArrayIndexOutOfBoundsException - if uriIndex is < 0 or >= resourceCount().