@Produces(value={"application/xml","text/xml","*/*"}) @Consumes(value={"application/xml","text/xml","*/*"}) @Singleton public final class DocumentProvider extends AbstractMessageReaderWriterProvider<org.w3c.dom.Document>
XML document
instances.Modifier and Type | Field and Description |
---|---|
private javax.inject.Provider<javax.xml.parsers.DocumentBuilderFactory> |
dbf |
private javax.inject.Provider<javax.xml.transform.TransformerFactory> |
tf |
UTF8
Constructor and Description |
---|
DocumentProvider() |
Modifier and Type | Method and Description |
---|---|
boolean |
isReadable(java.lang.Class<?> type,
java.lang.reflect.Type genericType,
java.lang.annotation.Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType) |
boolean |
isWriteable(java.lang.Class<?> type,
java.lang.reflect.Type genericType,
java.lang.annotation.Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType) |
org.w3c.dom.Document |
readFrom(java.lang.Class<org.w3c.dom.Document> type,
java.lang.reflect.Type genericType,
java.lang.annotation.Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> httpHeaders,
java.io.InputStream entityStream) |
void |
writeTo(org.w3c.dom.Document t,
java.lang.Class<?> type,
java.lang.reflect.Type genericType,
java.lang.annotation.Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.Object> httpHeaders,
java.io.OutputStream entityStream) |
getCharset, getSize, readFromAsString, writeTo, writeTo, writeToAsString
@Inject private javax.inject.Provider<javax.xml.parsers.DocumentBuilderFactory> dbf
@Inject private javax.inject.Provider<javax.xml.transform.TransformerFactory> tf
public boolean isReadable(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
public org.w3c.dom.Document readFrom(java.lang.Class<org.w3c.dom.Document> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> httpHeaders, java.io.InputStream entityStream) throws java.io.IOException
java.io.IOException
public boolean isWriteable(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
public void writeTo(org.w3c.dom.Document t, java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.Object> httpHeaders, java.io.OutputStream entityStream) throws java.io.IOException
java.io.IOException