de.grogra.pf.io
Class ReaderSourceImpl

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

public class ReaderSourceImpl
extends FilterSourceBase
implements ReaderSource

A simple implementation of ReaderSource which wraps an existing Reader.

Author:
Ole Kniemeyer

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
ReaderSourceImpl(java.io.Reader in, java.lang.String systemId, MimeType mimeType, Registry r, ModifiableMap metaData)
          Creates a new instance.
 
Method Summary
 java.io.Reader getReader()
          Returns a reader to obtain the data as a stream of characters.
 java.lang.String getSystemId()
          Returns a system id which identifies this source.
 
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

ReaderSourceImpl

public ReaderSourceImpl(java.io.Reader in,
                        java.lang.String systemId,
                        MimeType mimeType,
                        Registry r,
                        ModifiableMap metaData)
Creates a new instance.

Parameters:
in - the reader to be wrapped by the new instance
systemId - the system id for the reader
mimeType - the MIME type of the data
r - registry which defines the context within which the new instance will be used
metaData - some meta data, may be null
Method Detail

getReader

public java.io.Reader getReader()
Description copied from interface: ReaderSource
Returns a reader to obtain the data as a stream of characters.

Specified by:
getReader in interface ReaderSource
Returns:
a reader 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