Class SourceProvider.SourceWriter
java.lang.Object
org.glassfish.jersey.message.internal.SourceProvider.SourceWriter
- All Implemented Interfaces:
MessageBodyWriter<Source>
- Enclosing class:
- SourceProvider
@Produces({"application/xml","text/xml","*/*"})
@Consumes({"application/xml","text/xml","*/*"})
@Singleton
public static final class SourceProvider.SourceWriter
extends Object
implements MessageBodyWriter<Source>
Provider for marshaling
Source
instances.-
Constructor Summary
ConstructorsConstructorDescriptionSourceWriter
(jakarta.inject.Provider<SAXParserFactory> spf, jakarta.inject.Provider<TransformerFactory> tf) -
Method Summary
Modifier and TypeMethodDescriptionlong
boolean
isWriteable
(Class<?> t, Type gt, Annotation[] as, MediaType mediaType) void
writeTo
(Source source, Class<?> t, Type gt, Annotation[] as, MediaType mediaType, MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream)
-
Constructor Details
-
SourceWriter
@Inject public SourceWriter(@Context jakarta.inject.Provider<SAXParserFactory> spf, @Context jakarta.inject.Provider<TransformerFactory> tf)
-
-
Method Details
-
isWriteable
- Specified by:
isWriteable
in interfaceMessageBodyWriter<Source>
-
getSize
public long getSize(Source o, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType) - Specified by:
getSize
in interfaceMessageBodyWriter<Source>
-
writeTo
public void writeTo(Source source, Class<?> t, Type gt, Annotation[] as, MediaType mediaType, MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream) throws IOException- Specified by:
writeTo
in interfaceMessageBodyWriter<Source>
- Throws:
IOException
-