Class RawResourceData
- java.lang.Object
-
- org.pentaho.reporting.libraries.resourceloader.loader.raw.RawResourceData
-
- All Implemented Interfaces:
Serializable,ResourceData
public class RawResourceData extends Object implements ResourceData, Serializable
Creation-Date: 12.04.2006, 15:06:48- Author:
- Thomas Morgner
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface org.pentaho.reporting.libraries.resourceloader.ResourceData
CONTENT_LENGTH, CONTENT_TYPE, FILENAME
-
-
Constructor Summary
Constructors Constructor Description RawResourceData(ResourceKey rawKey)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectgetAttribute(String key)We do not support attributes.ResourceKeygetKey()longgetLength()byte[]getResource(ResourceManager caller)This is dangerous, especially if the resource is large.intgetResource(ResourceManager caller, byte[] target, long offset, int length)Tries to read data into the given byte-array.InputStreamgetResourceAsStream(ResourceManager caller)longgetVersion(ResourceManager caller)
-
-
-
Constructor Detail
-
RawResourceData
public RawResourceData(ResourceKey rawKey)
-
-
Method Detail
-
getResource
public byte[] getResource(ResourceManager caller) throws ResourceLoadingException
Description copied from interface:ResourceDataThis is dangerous, especially if the resource is large.- Specified by:
getResourcein interfaceResourceData- Returns:
- Throws:
ResourceLoadingException
-
getLength
public long getLength()
- Specified by:
getLengthin interfaceResourceData
-
getResourceAsStream
public InputStream getResourceAsStream(ResourceManager caller) throws ResourceLoadingException
- Specified by:
getResourceAsStreamin interfaceResourceData- Throws:
ResourceLoadingException
-
getResource
public int getResource(ResourceManager caller, byte[] target, long offset, int length) throws ResourceLoadingException
Tries to read data into the given byte-array.- Specified by:
getResourcein interfaceResourceData- Parameters:
caller-target-offset-length-- Returns:
- the number of bytes read or -1 if no more data can be read.
- Throws:
ResourceLoadingException
-
getAttribute
public Object getAttribute(String key)
We do not support attributes.- Specified by:
getAttributein interfaceResourceData- Parameters:
key-- Returns:
-
getKey
public ResourceKey getKey()
- Specified by:
getKeyin interfaceResourceData
-
getVersion
public long getVersion(ResourceManager caller) throws ResourceLoadingException
- Specified by:
getVersionin interfaceResourceData- Throws:
ResourceLoadingException
-
-