java.lang.Object
de.grogra.pf.io.FilterSourceBase
de.grogra.pf.io.ReaderSourceImpl
- All Implemented Interfaces:
FilterSource
,ReaderSource
,RegistryContext
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
ConstructorDescriptionReaderSourceImpl
(Reader in, String systemId, MimeType mimeType, Registry r, ModifiableMap metaData) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionReturns a reader to obtain the data as a stream of characters.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 Details
-
ReaderSourceImpl
public ReaderSourceImpl(Reader in, 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 benull
-
-
Method Details
-
getSystemId
Description copied from interface:FilterSource
Returns a system id which identifies this source.- Specified by:
getSystemId
in interfaceFilterSource
- Returns:
- system id
-
getReader
Description copied from interface:ReaderSource
Returns a reader to obtain the data as a stream of characters.- Specified by:
getReader
in interfaceReaderSource
- Returns:
- a reader for the data
-