de.grogra.pf.io
Class InputStreamSourceImpl

java.lang.Object
  extended by de.grogra.pf.io.FilterSourceBase
      extended by de.grogra.pf.io.InputStreamSourceImpl
All Implemented Interfaces:
FilterSource, InputStreamSource, RegistryContext

public class InputStreamSourceImpl
extends FilterSourceBase
implements InputStreamSource


Nested Class Summary
 
Nested classes/interfaces inherited from interface de.grogra.pf.io.FilterSource
FilterSource.MetaDataKey<V>
 
Field Summary
 
Fields inherited from interface de.grogra.pf.io.FilterSource
AUTO_PROGRESS, DESTINATION_FILE, DESTINATION_URL
 
Constructor Summary
InputStreamSourceImpl(java.io.InputStream in, java.lang.String systemId, MimeType mimeType, Registry r, ModifiableMap metaData)
           
 
Method Summary
 java.io.InputStream getInputStream()
          Returns a stream to obtain the data as a stream of bytes.
 java.lang.String getSystemId()
          Returns a system id which identifies this source.
 long length()
          Returns the total number of bytes of this stream.
 
Methods inherited from class de.grogra.pf.io.FilterSourceBase
getFilter, getFlavor, getMetaData, getRegistry, initProgressMonitor, setMetaData, setProgress, setProgress0, setProgressImpl, toString, useAutoProgress
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface de.grogra.pf.io.FilterSource
getFilter, getFlavor, getMetaData, initProgressMonitor, setMetaData, setProgress
 
Methods inherited from interface de.grogra.pf.registry.RegistryContext
getRegistry
 

Constructor Detail

InputStreamSourceImpl

public InputStreamSourceImpl(java.io.InputStream in,
                             java.lang.String systemId,
                             MimeType mimeType,
                             Registry r,
                             ModifiableMap metaData)
Method Detail

getInputStream

public java.io.InputStream getInputStream()
Description copied from interface: InputStreamSource
Returns a stream to obtain the data as a stream of bytes.

Specified by:
getInputStream in interface InputStreamSource
Returns:
an input stream for the data

getSystemId

public java.lang.String getSystemId()
Description copied from interface: FilterSource
Returns a system id which identifies this source.

Specified by:
getSystemId in interface FilterSource
Returns:
system id

length

public long length()
Description copied from interface: InputStreamSource
Returns the total number of bytes of this stream. A negative values indicates that this number is unknown.

Specified by:
length in interface InputStreamSource
Returns:
number of bytes