public class RawResourceData extends Object implements ResourceData
CONTENT_LENGTH, CONTENT_TYPE, FILENAME| Constructor and Description |
|---|
RawResourceData(ResourceKey rawKey) |
| Modifier and Type | Method and Description |
|---|---|
Object |
getAttribute(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.
|
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 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 Object getAttribute(String key)
getAttribute in interface ResourceDatakey - public ResourceKey getKey()
getKey in interface ResourceDatapublic long getVersion(ResourceManager caller) throws ResourceLoadingException
getVersion in interface ResourceDataResourceLoadingException