Class ResourceDataInputSource
- java.lang.Object
-
- org.xml.sax.InputSource
-
- org.pentaho.reporting.libraries.xmlns.parser.ResourceDataInputSource
-
public class ResourceDataInputSource extends InputSource
A SAX InputSource implementation that reads its data from a LibLoader ResourceData object.- Author:
- Thomas Morgner
-
-
Constructor Summary
Constructors Constructor Description ResourceDataInputSource(org.pentaho.reporting.libraries.resourceloader.ResourceData data, org.pentaho.reporting.libraries.resourceloader.ResourceManager caller)Creates a new InputSource using the given resource-data and resource-manager as source.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InputStreamgetByteStream()Get the byte stream for this input source.org.pentaho.reporting.libraries.resourceloader.ResourceDatagetData()Returns the resource-data object that provides the raw-data.longgetVersion()Returns the version (changetracker) of this input source.voidsetByteStream(InputStream byteStream)Set the byte stream for this input source.-
Methods inherited from class org.xml.sax.InputSource
getCharacterStream, getEncoding, getPublicId, getSystemId, isEmpty, setCharacterStream, setEncoding, setPublicId, setSystemId
-
-
-
-
Constructor Detail
-
ResourceDataInputSource
public ResourceDataInputSource(org.pentaho.reporting.libraries.resourceloader.ResourceData data, org.pentaho.reporting.libraries.resourceloader.ResourceManager caller) throws org.pentaho.reporting.libraries.resourceloader.ResourceLoadingExceptionCreates a new InputSource using the given resource-data and resource-manager as source.- Parameters:
data- the resource-data object holding the raw-data.caller- the resource manager that is loading the current resource.- Throws:
org.pentaho.reporting.libraries.resourceloader.ResourceLoadingException- if an error occurs.- See Also:
InputSource.setPublicId(java.lang.String),InputSource.setSystemId(java.lang.String),setByteStream(java.io.InputStream),InputSource.setCharacterStream(java.io.Reader),InputSource.setEncoding(java.lang.String)
-
-
Method Detail
-
setByteStream
public void setByteStream(InputStream byteStream)
Set the byte stream for this input source.- Overrides:
setByteStreamin classInputSource- Parameters:
byteStream- A byte stream containing an XML document or other entity.
-
getByteStream
public InputStream getByteStream()
Get the byte stream for this input source.The getEncoding method will return the character encoding for this byte stream, or null if unknown.
- Overrides:
getByteStreamin classInputSource- Returns:
- The byte stream, or null if none was supplied.
- See Also:
InputSource.getEncoding(),setByteStream(java.io.InputStream)
-
getData
public org.pentaho.reporting.libraries.resourceloader.ResourceData getData()
Returns the resource-data object that provides the raw-data.- Returns:
- the resource-data object.
-
getVersion
public long getVersion()
Returns the version (changetracker) of this input source.- Returns:
- the version (changetracker) of the input source.
-
-