Class StreamRepository

java.lang.Object
org.pentaho.reporting.libraries.repository.stream.StreamRepository
All Implemented Interfaces:
Repository

public class StreamRepository extends java.lang.Object implements Repository
A repository that feeds a single source.
Author:
Thomas Morgner
  • Constructor Summary

    Constructors
    Constructor
    Description
    StreamRepository(java.io.InputStream inputStream, java.io.OutputStream outputStream)
    Deprecated.
    This constructor should not be used, as it hardcodes the filename for the input stream.
    StreamRepository(java.io.InputStream inputStream, java.io.OutputStream outputStream, java.lang.String contentName)
    Creates a new repository that potentially allows both read and write access.
    StreamRepository(java.io.InputStream inputStream, java.lang.String contentName)
    Creates a new read-only repository.
    StreamRepository(java.io.OutputStream outputStream)
    Creates a new write-only repository.
  • Method Summary

    Modifier and Type
    Method
    Description
    java.lang.String
    Returns the optional content name by which the data in the input-stream should be accessed.
    Returns the optional input stream.
    Returns the mime registry for this repository.
    Returns the optional output stream.
    Returns the content root of this repository.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • StreamRepository

      public StreamRepository(java.io.InputStream inputStream, java.io.OutputStream outputStream, java.lang.String contentName)
      Creates a new repository that potentially allows both read and write access. If an input stream is given, then a content name must be given as well.
      Parameters:
      inputStream - the inputstream from which to read from.
      outputStream - the output stream to which to write to.
      contentName - the content name by which the content should be accessed.
    • StreamRepository

      public StreamRepository(java.io.InputStream inputStream, java.io.OutputStream outputStream)
      Deprecated.
      This constructor should not be used, as it hardcodes the filename for the input stream. Use one of the other constructors instead.
      Creates a new read/write repository with a hardcoded name for the input stream.
      Parameters:
      inputStream - the input stream from where to read the data (can be null).
      outputStream - the output stream where data is written to (can be null).
    • StreamRepository

      public StreamRepository(java.io.InputStream inputStream, java.lang.String contentName)
      Creates a new read-only repository.
      Parameters:
      inputStream - the input stream from where to read the data (can be null).
      contentName - the content name by which the content should be accessed.
    • StreamRepository

      public StreamRepository(java.io.OutputStream outputStream)
      Creates a new write-only repository.
      Parameters:
      outputStream - the output stream to which to write to.
  • Method Details

    • getContentName

      public java.lang.String getContentName()
      Returns the optional content name by which the data in the input-stream should be accessed.
      Returns:
      the content name or null, if this repository is write-only.
    • getOutputStream

      public WrappedOutputStream getOutputStream()
      Returns the optional output stream.
      Returns:
      the stream or null, if this repository is read-only.
    • getInputStream

      public WrappedInputStream getInputStream()
      Returns the optional input stream.
      Returns:
      the stream or null, if this repository is write-only.
    • getRoot

      public ContentLocation getRoot()
      Returns the content root of this repository.
      Specified by:
      getRoot in interface Repository
      Returns:
      the content root.
    • getMimeRegistry

      public MimeRegistry getMimeRegistry()
      Returns the mime registry for this repository.
      Specified by:
      getMimeRegistry in interface Repository
      Returns:
      the mime-registry.
      See Also: