Class StreamRepresentation

  • Direct Known Subclasses:
    InputRepresentation

    public abstract class StreamRepresentation
    extends Representation
    Representation based on a BIO stream.
    Author:
    Jerome Louvel
    • Constructor Detail

      • StreamRepresentation

        public StreamRepresentation​(MediaType mediaType)
        Constructor.
        Parameters:
        mediaType - The media type.
    • Method Detail

      • getReader

        public java.io.Reader getReader()
                                 throws java.io.IOException
        Description copied from class: Representation
        Returns a characters reader with the representation's content. This method is ensured to return a fresh reader for each invocation unless it is a transient representation, in which case null is returned. If the representation has no character set defined, the system's default one will be used.
        Specified by:
        getReader in class Representation
        Returns:
        A reader with the representation's content.
        Throws:
        java.io.IOException