Class ByteArrayMessageBodyWriter
- java.lang.Object
-
- org.openprovenance.prov.service.core.ByteArrayMessageBodyWriter
-
- All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyWriter<ByteArrayOutputStream>
@Provider @Produces("text/xml") public class ByteArrayMessageBodyWriter extends Object implements javax.ws.rs.ext.MessageBodyWriter<ByteArrayOutputStream>
-
-
Constructor Summary
Constructors Constructor Description ByteArrayMessageBodyWriter()
-
Method Summary
Modifier and Type Method Description longgetSize(ByteArrayOutputStream t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)booleanisWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)StringtrimCharSet(javax.ws.rs.core.MediaType mediaType)voidwriteTo(ByteArrayOutputStream doc, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, OutputStream out)
-
-
-
Method Detail
-
trimCharSet
public String trimCharSet(javax.ws.rs.core.MediaType mediaType)
-
isWriteable
public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
- Specified by:
isWriteablein interfacejavax.ws.rs.ext.MessageBodyWriter<ByteArrayOutputStream>
-
getSize
public long getSize(ByteArrayOutputStream t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
- Specified by:
getSizein interfacejavax.ws.rs.ext.MessageBodyWriter<ByteArrayOutputStream>
-
writeTo
public void writeTo(ByteArrayOutputStream doc, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, OutputStream out) throws IOException, javax.ws.rs.WebApplicationException
- Specified by:
writeToin interfacejavax.ws.rs.ext.MessageBodyWriter<ByteArrayOutputStream>- Throws:
IOExceptionjavax.ws.rs.WebApplicationException
-
-