Class SourceProvider.SourceWriter
- java.lang.Object
-
- org.glassfish.jersey.message.internal.SourceProvider.SourceWriter
-
- All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyWriter<javax.xml.transform.Source>
- Enclosing class:
- SourceProvider
@Produces({"application/xml","text/xml","*/*"}) @Consumes({"application/xml","text/xml","*/*"}) @Singleton public static final class SourceProvider.SourceWriter extends java.lang.Object implements javax.ws.rs.ext.MessageBodyWriter<javax.xml.transform.Source>
Provider for marshalingSource
instances.
-
-
Field Summary
Fields Modifier and Type Field Description private javax.inject.Provider<javax.xml.parsers.SAXParserFactory>
saxParserFactory
private javax.inject.Provider<javax.xml.transform.TransformerFactory>
transformerFactory
-
Constructor Summary
Constructors Constructor Description SourceWriter(javax.inject.Provider<javax.xml.parsers.SAXParserFactory> spf, javax.inject.Provider<javax.xml.transform.TransformerFactory> tf)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getSize(javax.xml.transform.Source o, 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<?> t, java.lang.reflect.Type gt, java.lang.annotation.Annotation[] as, javax.ws.rs.core.MediaType mediaType)
void
writeTo(javax.xml.transform.Source source, java.lang.Class<?> t, java.lang.reflect.Type gt, java.lang.annotation.Annotation[] as, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.Object> httpHeaders, java.io.OutputStream entityStream)
-
-
-
Method Detail
-
isWriteable
public boolean isWriteable(java.lang.Class<?> t, java.lang.reflect.Type gt, java.lang.annotation.Annotation[] as, javax.ws.rs.core.MediaType mediaType)
- Specified by:
isWriteable
in interfacejavax.ws.rs.ext.MessageBodyWriter<javax.xml.transform.Source>
-
getSize
public long getSize(javax.xml.transform.Source o, java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
- Specified by:
getSize
in interfacejavax.ws.rs.ext.MessageBodyWriter<javax.xml.transform.Source>
-
writeTo
public void writeTo(javax.xml.transform.Source source, java.lang.Class<?> t, java.lang.reflect.Type gt, java.lang.annotation.Annotation[] as, 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
- Specified by:
writeTo
in interfacejavax.ws.rs.ext.MessageBodyWriter<javax.xml.transform.Source>
- Throws:
java.io.IOException
-
-