Class WriterRepresentation

    • Constructor Detail

      • WriterRepresentation

        public WriterRepresentation​(MediaType mediaType)
        Constructor.
        Parameters:
        mediaType - The representation's mediaType.
      • WriterRepresentation

        public WriterRepresentation​(MediaType mediaType,
                                    long expectedSize)
        Constructor.
        Parameters:
        mediaType - The representation's mediaType.
        expectedSize - The expected writer size in bytes.
    • 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