Interface MessageBodyWriter
-
- All Known Implementing Classes:
SingletonProvider
@Deprecated public interface MessageBodyWriterDeprecated.Will be removed in next minor release.Interface to access a wrapped an initializedMessageBodyWriter- See Also:
MessageBodyWriter
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description javax.ws.rs.ext.MessageBodyWriter<?>getJaxRsWriter()Deprecated.Returns the JAX-RSMessageBodyWriter.java.util.List<MediaType>getProducedMimes()Deprecated.Returns the list of producedMediaTypes of the wrappedMessageBodyWriter.longgetSize(java.lang.Object t, java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, MediaType mediaType)Deprecated.Called beforewriteToto ascertain the length in bytes of the serialized form oft.booleanisWriteable(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)Deprecated.booleansupportsWrite(java.lang.Class<?> entityClass, java.lang.reflect.Type genericType)Deprecated.Checks, if this message body writer supports the given type (by the type parameter of theMessageBodyWriter)booleansupportsWrite(java.lang.Iterable<MediaType> mediaTypes)Deprecated.Checks, if the wrapped MessageBodyWriter supports at least one of the givenMediaTypes.booleansupportsWrite(MediaType mediaType)Deprecated.Checks, if the wrapped MessageBodyWriter supports the givenMediaType.voidwriteTo(java.lang.Object object, java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, MediaType mediaType, javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.Object> httpHeaders, java.io.OutputStream entityStream)Deprecated.
-
-
-
Method Detail
-
getJaxRsWriter
javax.ws.rs.ext.MessageBodyWriter<?> getJaxRsWriter()
Deprecated.Returns the JAX-RSMessageBodyWriter.- Returns:
- the JAX-RS MessageBodyWriter
-
getProducedMimes
java.util.List<MediaType> getProducedMimes()
Deprecated.Returns the list of producedMediaTypes of the wrappedMessageBodyWriter.- Returns:
- List of produced Restlet
MediaTypes. If the entity provider is not annotated with @Produces, '*/*' is returned.
-
getSize
long getSize(java.lang.Object t, java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, MediaType mediaType)Deprecated.Called beforewriteToto ascertain the length in bytes of the serialized form oft. A non-negative return value is used in a HTTPContent-Lengthheader.- Parameters:
t- the instance to writetype-genericType-annotations-mediaType- The Restlet MediaType- Returns:
- length in bytes or -1 if the length cannot be determined in advance
- See Also:
MessageBodyWriter.getSize(Object, Class, Type, Annotation[], javax.ws.rs.core.MediaType)
-
isWriteable
boolean isWriteable(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)Deprecated.- Parameters:
type-genericType-annotations-mediaType- The JAX-RS MediaType- Returns:
- true, if the wrapped writer could write an object of the given class with the given annotations and media type.
- See Also:
javax.ws.rs.ext.MessageBodyWriter#isWriteable(Class, Type, Annotation[])
-
supportsWrite
boolean supportsWrite(java.lang.Class<?> entityClass, java.lang.reflect.Type genericType)Deprecated.Checks, if this message body writer supports the given type (by the type parameter of theMessageBodyWriter)- Parameters:
entityClass- the typegenericType- the generic type- Returns:
- true, if this MessageBodyWriter supports the given type, false, if not.
-
supportsWrite
boolean supportsWrite(java.lang.Iterable<MediaType> mediaTypes)
Deprecated.Checks, if the wrapped MessageBodyWriter supports at least one of the givenMediaTypes.
-
supportsWrite
boolean supportsWrite(MediaType mediaType)
Deprecated.Checks, if the wrapped MessageBodyWriter supports the givenMediaType.
-
writeTo
void writeTo(java.lang.Object object, java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, MediaType mediaType, javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.Object> httpHeaders, java.io.OutputStream entityStream) throws java.io.IOException, javax.ws.rs.WebApplicationExceptionDeprecated.- Parameters:
object-type-genericType-annotations-mediaType- The Restlet MediaTypehttpHeaders-entityStream-- Throws:
java.io.IOExceptionjavax.ws.rs.WebApplicationException- See Also:
MessageBodyWriter.writeTo(Object, Class, Type, Annotation[], javax.ws.rs.core.MediaType, MultivaluedMap, OutputStream)
-
-