Class DocumentProvider
java.lang.Object
org.glassfish.jersey.message.internal.AbstractMessageReaderWriterProvider<Document>
org.glassfish.jersey.jaxb.internal.DocumentProvider
- All Implemented Interfaces:
MessageBodyReader<Document>,MessageBodyWriter<Document>
@Produces({"application/xml","text/xml","*/*"})
@Consumes({"application/xml","text/xml","*/*"})
@Singleton
public final class DocumentProvider
extends AbstractMessageReaderWriterProvider<Document>
Provider for marshalling/un-marshalling
XML document instances.- Author:
- Paul Sandoz, Marek Potociar
-
Field Summary
Fields inherited from class org.glassfish.jersey.message.internal.AbstractMessageReaderWriterProvider
UTF8 -
Constructor Summary
ConstructorsConstructorDescriptionDocumentProvider(jakarta.inject.Provider<DocumentBuilderFactory> dbf, jakarta.inject.Provider<TransformerFactory> tf) -
Method Summary
Modifier and TypeMethodDescriptionbooleanisReadable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType) booleanisWriteable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType) readFrom(Class<Document> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, String> httpHeaders, InputStream entityStream) voidwriteTo(Document t, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream) Methods inherited from class org.glassfish.jersey.message.internal.AbstractMessageReaderWriterProvider
getCharset, getSize, readFromAsString, writeTo, writeTo, writeToAsString
-
Constructor Details
-
DocumentProvider
@Inject public DocumentProvider(jakarta.inject.Provider<DocumentBuilderFactory> dbf, jakarta.inject.Provider<TransformerFactory> tf)
-
-
Method Details
-
isReadable
public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType) -
readFrom
public Document readFrom(Class<Document> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, String> httpHeaders, InputStream entityStream) throws IOException- Throws:
IOException
-
isWriteable
public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType) -
writeTo
public void writeTo(Document t, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream) throws IOException- Throws:
IOException
-