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
  • 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 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 Details

    • getSystemId

      public String getSystemId()
      Description copied from interface: FilterSource
      Returns a system id which identifies this source.
      Specified by:
      getSystemId in interface FilterSource
      Returns:
      system id
    • getReader

      public 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