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