Class JaxRsOutputRepresentation<T>
- java.lang.Object
-
- org.restlet.representation.Variant
-
- org.restlet.representation.RepresentationInfo
-
- org.restlet.representation.Representation
-
- org.restlet.representation.StreamRepresentation
-
- org.restlet.representation.OutputRepresentation
-
- org.restlet.ext.jaxrs.internal.util.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 aMessageBodyWriter.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.annotation.Annotation[]annotationsDeprecated.private java.lang.reflect.TypegenericTypeDeprecated.private javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.Object>httpHeadersDeprecated.private static java.util.logging.LoggerLOGGERDeprecated.private MessageBodyWritermbwDeprecated.private TobjectDeprecated.-
Fields inherited from class org.restlet.representation.Representation
UNKNOWN_SIZE
-
-
Constructor Summary
Constructors Constructor Description 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidwrite(java.io.OutputStream outputStream)Deprecated.Writes the representation to a byte stream.-
Methods inherited from class org.restlet.representation.OutputRepresentation
getChannel, getStream
-
Methods inherited from class org.restlet.representation.StreamRepresentation
getReader, write, write
-
Methods inherited from class org.restlet.representation.Representation
append, exhaust, getAvailableSize, getDigest, getDisposition, getExpirationDate, getRange, getRegistration, getSize, getText, hasKnownSize, isAvailable, isEmpty, isSelectable, isTransient, release, setAvailable, setDigest, setDisposition, setExpirationDate, setListener, setRange, setSize, setTransient
-
Methods inherited from class org.restlet.representation.RepresentationInfo
getModificationDate, getTag, setModificationDate, setTag
-
Methods inherited from class org.restlet.representation.Variant
createClientInfo, equals, getCharacterSet, getEncodings, getLanguages, getLocationRef, getMediaType, hashCode, includes, isCompatible, setCharacterSet, setEncodings, setLanguages, setLocationRef, setLocationRef, setMediaType, toString
-
-
-
-
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.
-
mbw
private final MessageBodyWriter mbw
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 genericTypeto convert to.genericType- The genericTypeto convert to.mediaType- the MediaType of the object. Must be concrete, seeMediaType.isConcrete().annotations- the annotations of the artefact to convert tombw- 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.IOExceptionDeprecated.Description copied from class:RepresentationWrites 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 givenOutputStreamafter writing to it as this will be handled by the Restlet connectors automatically.- Specified by:
writein classRepresentation- Parameters:
outputStream- The output stream.- Throws:
java.io.IOException- See Also:
Representation.write(java.io.OutputStream)
-
-