de.grogra.pf.io
Class ReaderSourceImpl
java.lang.Object
de.grogra.pf.io.FilterSourceBase
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
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 |
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 instancesystemId
- the system id for the readermimeType
- the MIME type of the datar
- registry which defines the context within which the new instance will be usedmetaData
- some meta data, may be null
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