com.calitha.resource
Class JavaResource
java.lang.Object
com.calitha.resource.Resource
com.calitha.resource.BinaryResource
com.calitha.resource.JavaResource
- All Implemented Interfaces:
- IResource
public final class JavaResource
- extends BinaryResource
A JavaResource object represents a resource that uses the classloader to
locate resources.
- Author:
- Robert van Loenhout
|
Method Summary |
byte[] |
getBytes()
Gets the content of the resource as a byte array. |
String |
getName()
Gets the name of the resource that is used to locate the resource. |
JavaResource
public JavaResource(Locale locale,
String namespace,
String id,
String mimetype,
String name)
- Creates a new JavaResource object.
- Parameters:
locale - localenamespace - namespaceid - idmimetype - mimetypename - name
- Throws:
IllegalArgumentException - if an argument is null
getName
public String getName()
- Gets the name of the resource that is used to locate the resource.
- Returns:
- resource name
getBytes
public byte[] getBytes()
- Description copied from interface:
IResource
- Gets the content of the resource as a byte array.
- Returns:
- bytes