Class JaxRsOutputRepresentation<T>

  • Type Parameters:
    T - type of the object to serialize.

    @Deprecated
    public class JaxRsOutputRepresentation<T>
    extends OutputRepresentation
    Deprecated.
    Will be removed in next minor release.
    This representation is used to write the Representations with a MessageBodyWriter.
    • Field Detail

      • LOGGER

        private static final java.util.logging.Logger LOGGER
        Deprecated.
      • annotations

        private final java.lang.annotation.Annotation[] annotations
        Deprecated.
      • genericType

        private final java.lang.reflect.Type genericType
        Deprecated.
      • httpHeaders

        private final javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.Object> httpHeaders
        Deprecated.
      • object

        private final T object
        Deprecated.
    • Constructor Detail

      • JaxRsOutputRepresentation

        public JaxRsOutputRepresentation​(T object,
                                         java.lang.reflect.Type genericType,
                                         MediaType mediaType,
                                         java.lang.annotation.Annotation[] annotations,
                                         MessageBodyWriter mbw,
                                         javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.Object> httpHeaders)
        Deprecated.
        Creates a new JaxRsOutputRepresentation.
        Parameters:
        object - the object to serialize The generic Type to convert to.
        genericType - The generic Type to convert to.
        mediaType - the MediaType of the object. Must be concrete, see MediaType.isConcrete().
        annotations - the annotations of the artefact to convert to
        mbw - the MessageBodyWriter which will serialize the object.
        httpHeaders - the mutable Map of HTTP response headers.
    • Method Detail

      • write

        public void write​(java.io.OutputStream outputStream)
                   throws java.io.IOException
        Deprecated.
        Description copied from class: Representation
        Writes the representation to a byte stream. This method is ensured to write the full content for each invocation unless it is a transient representation, in which case an exception is thrown.

        Note that the class implementing this method shouldn't flush or close the given OutputStream after writing to it as this will be handled by the Restlet connectors automatically.
        Specified by:
        write in class Representation
        Parameters:
        outputStream - The output stream.
        Throws:
        java.io.IOException
        See Also:
        Representation.write(java.io.OutputStream)