org.pentaho.reporting.libraries.resourceloader.loader

## Class AbstractResourceData

- java.lang.Object
- - org.pentaho.reporting.libraries.resourceloader.loader.AbstractResourceData

All Implemented Interfaces:
  java.io.Serializable, ResourceData

Direct Known Subclasses:
  ClassloaderResourceData, FileResourceData, URLResourceData, ZipResourceData

    public abstract class AbstractResourceData
    extends java.lang.Object
    implements ResourceData, java.io.Serializable

Creation-Date: 05.04.2006, 15:24:47

Author:
  Thomas Morgner
See Also:
  Serialized Form

### Field Summary

### Fields inherited from interface org.pentaho.reporting.libraries.resourceloader.ResourceData

`CONTENT_LENGTH, CONTENT_TYPE, FILENAME`

### Method Summary

Methods
`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.

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.pentaho.reporting.libraries.resourceloader.ResourceData

`getAttribute, getKey, getResourceAsStream, getVersion`

### Method Detail

#### getResource

    public byte[] getResource(ResourceManager caller)
                       throws ResourceLoadingException

Description copied from interface: `ResourceData`
This is dangerous, especially if the resource is large.

Specified by:
  `getResource` in interface `ResourceData`
Returns:
Throws:
  `ResourceLoadingException`

#### getLength

    public long getLength()

Specified by:
  `getLength` in interface `ResourceData`

#### getResource

    public int getResource(ResourceManager caller,
                  byte[] target,
                  long offset,
                  int length)
                    throws ResourceLoadingException

Description copied from interface: `ResourceData`
Tries to read data into the given byte-array.

Specified by:
  `getResource` in interface `ResourceData`
Returns:
  the number of bytes read or -1 if no more data can be read.
Throws:
  `ResourceLoadingException`