synergynetframework.utils.io
Class ResourceUtils

java.lang.Object
  extended by synergynetframework.utils.io.ResourceUtils

public class ResourceUtils
extends java.lang.Object

The Class ResourceUtils.


Constructor Summary
ResourceUtils()
           
 
Method Summary
static java.lang.String[] getResourceListing(java.lang.Class<?> clazz, java.lang.String path)
          List directory contents for a resource folder.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceUtils

public ResourceUtils()
Method Detail

getResourceListing

public static java.lang.String[] getResourceListing(java.lang.Class<?> clazz,
                                                    java.lang.String path)
                                             throws java.net.URISyntaxException,
                                                    java.io.IOException
List directory contents for a resource folder. Not recursive. This is basically a brute-force implementation. Works for regular files and also JARs.

Parameters:
clazz - Any java class that lives in the same place as the resources you want.
path - Should end with "/".
Returns:
Just the name of each member item, not the full paths.
Throws:
java.net.URISyntaxException - the URI syntax exception
java.io.IOException - Signals that an I/O exception has occurred.