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
ResourceData
getResource
in interface ResourceData
ResourceLoadingException
public long getLength()
getLength
in interface ResourceData
public java.io.InputStream getResourceAsStream(ResourceManager caller) throws ResourceLoadingException
getResourceAsStream
in interface ResourceData
ResourceLoadingException
public int getResource(ResourceManager caller, byte[] target, long offset, int length) throws ResourceLoadingException
getResource
in interface ResourceData
caller
- target
- offset
- length
- ResourceLoadingException
public java.lang.Object getAttribute(java.lang.String key)
getAttribute
in interface ResourceData
key
- public ResourceKey getKey()
getKey
in interface ResourceData
public long getVersion(ResourceManager caller) throws ResourceLoadingException
getVersion
in interface ResourceData
ResourceLoadingException