public class RawResourceData extends java.lang.Object implements ResourceData
CONTENT_LENGTH, CONTENT_TYPE, FILENAME| Constructor and Description |
|---|
RawResourceData(ResourceKey rawKey) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
getAttribute(java.lang.String key)
We do not support attributes.
|
ResourceKey |
getKey() |
long |
getLength() |
byte[] |
getResource(ResourceManager caller)
This is dangerous, especially if the resource is large.
|
int |
getResource(ResourceManager caller,
byte[] target,
long offset,
int length)
Tries to read data into the given byte-array.
|
java.io.InputStream |
getResourceAsStream(ResourceManager caller) |
long |
getVersion(ResourceManager caller) |
public RawResourceData(ResourceKey rawKey)
public byte[] getResource(ResourceManager caller) throws ResourceLoadingException
ResourceDatagetResource in interface ResourceDataResourceLoadingExceptionpublic long getLength()
getLength in interface ResourceDatapublic java.io.InputStream getResourceAsStream(ResourceManager caller) throws ResourceLoadingException
getResourceAsStream in interface ResourceDataResourceLoadingExceptionpublic int getResource(ResourceManager caller, byte[] target, long offset, int length) throws ResourceLoadingException
getResource in interface ResourceDatacaller - target - offset - length - ResourceLoadingExceptionpublic java.lang.Object getAttribute(java.lang.String key)
getAttribute in interface ResourceDatakey - public ResourceKey getKey()
getKey in interface ResourceDatapublic long getVersion(ResourceManager caller) throws ResourceLoadingException
getVersion in interface ResourceDataResourceLoadingException