Class MessageWriter
java.lang.Object
org.glassfish.jersey.examples.jersey_ejb.entities.MessageWriter
- All Implemented Interfaces:
MessageBodyWriter<Message>
A simple message body writer to serialize a single message bean.
- Author:
- Pavel Bucek
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongbooleanisWriteable(Class<?> clazz, Type type, Annotation[] annotation, MediaType mediaType) voidwriteTo(Message message, Class<?> clazz, Type type, Annotation[] annotation, MediaType mediaType, MultivaluedMap<String, Object> arg5, OutputStream ostream)
-
Constructor Details
-
MessageWriter
public MessageWriter()
-
-
Method Details
-
isWriteable
- Specified by:
isWriteablein interfaceMessageBodyWriter<Message>
-
getSize
public long getSize(Message message, Class<?> clazz, Type type, Annotation[] annotation, MediaType mediaType) - Specified by:
getSizein interfaceMessageBodyWriter<Message>
-
writeTo
public void writeTo(Message message, Class<?> clazz, Type type, Annotation[] annotation, MediaType mediaType, MultivaluedMap<String, Object> arg5, OutputStream ostream) throws IOException, WebApplicationException- Specified by:
writeToin interfaceMessageBodyWriter<Message>- Throws:
IOExceptionWebApplicationException
-