|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jppf.classloader.ResourceProvider
public class ResourceProvider
Instances of this class are dedicated to reading resource files form the JVM's classpath and converting them into arrays of bytes.
| Constructor Summary | |
|---|---|
ResourceProvider()
Default constructor. |
|
| Method Summary | |
|---|---|
byte[] |
computeCallable(byte[] serializedCallable)
Compute a callable sent through the JPPF class loader. |
Map<String,List<byte[]>> |
getMultipleResourcesAsBytes(ClassLoader cl,
String... names)
Get all resources asssociated with each specified resource name. |
List<byte[]> |
getMultipleResourcesAsBytes(String name,
ClassLoader cl)
Get all resources asssociated with the specified resource name. |
byte[] |
getResource(String resName)
Get a resource as an array of byte using a call to ClassLoader#getResource(). |
byte[] |
getResource(String resName,
ClassLoader cl)
Get a resource as an array of byte using a call to ClassLoader#getResource(). |
byte[] |
getResourceAsBytes(String resName)
Load a resource file (including class files) from the class path into an array of byte. |
byte[] |
getResourceAsBytes(String resName,
ClassLoader cl)
Load a resource file (including class files) from the class path or the file system into an array of byte. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ResourceProvider()
| Method Detail |
|---|
public byte[] getResourceAsBytes(String resName)
getResourceAsBytes(String, ClassLoader)
with a null class loader.
resName - the name of the resource to load.
public byte[] getResourceAsBytes(String resName,
ClassLoader cl)
ClassLoader.getResourceAsStream(String)
resName - the name of the resource to load.cl - the class loader to use to load the request resource.
public byte[] getResource(String resName)
getResource(String, ClassLoader)
with a null class loader.
resName - the name of the resource to find.
public byte[] getResource(String resName,
ClassLoader cl)
resName - the name of the resource to find.cl - the class loader to use to load the request resource.
public byte[] computeCallable(byte[] serializedCallable)
serializedCallable - the callable to execute in serialized form.
public List<byte[]> getMultipleResourcesAsBytes(String name,
ClassLoader cl)
name - the name of the resources to look for.cl - the class loader used to load the resources.
public Map<String,List<byte[]>> getMultipleResourcesAsBytes(ClassLoader cl,
String... names)
cl - the class loader used to load the resources.names - the names of all the resources to look for.
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||