org.glassfish.jersey.message.internal
Class SourceProvider.SourceWriter

java.lang.Object
  extended by org.glassfish.jersey.message.internal.SourceProvider.SourceWriter
All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyWriter<Source>
Enclosing class:
SourceProvider

@Produces(value={"application/xml","text/xml","*/*"})
@Consumes(value={"application/xml","text/xml","*/*"})
@Singleton
public static final class SourceProvider.SourceWriter
extends Object
implements javax.ws.rs.ext.MessageBodyWriter<Source>

Provider for marshaling Source instances.


Constructor Summary
SourceProvider.SourceWriter(org.glassfish.hk2.api.Factory<SAXParserFactory> spf, org.glassfish.hk2.api.Factory<TransformerFactory> tf)
           
 
Method Summary
 long getSize(Source o, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
           
 boolean isWriteable(Class<?> t, Type gt, Annotation[] as, javax.ws.rs.core.MediaType mediaType)
           
 void writeTo(Source source, Class<?> t, Type gt, Annotation[] as, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, OutputStream entityStream)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SourceProvider.SourceWriter

public SourceProvider.SourceWriter(@Context
                                   org.glassfish.hk2.api.Factory<SAXParserFactory> spf,
                                   @Context
                                   org.glassfish.hk2.api.Factory<TransformerFactory> tf)
Method Detail

isWriteable

public boolean isWriteable(Class<?> t,
                           Type gt,
                           Annotation[] as,
                           javax.ws.rs.core.MediaType mediaType)
Specified by:
isWriteable in interface javax.ws.rs.ext.MessageBodyWriter<Source>

getSize

public long getSize(Source o,
                    Class<?> type,
                    Type genericType,
                    Annotation[] annotations,
                    javax.ws.rs.core.MediaType mediaType)
Specified by:
getSize in interface javax.ws.rs.ext.MessageBodyWriter<Source>

writeTo

public void writeTo(Source source,
                    Class<?> t,
                    Type gt,
                    Annotation[] as,
                    javax.ws.rs.core.MediaType mediaType,
                    javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders,
                    OutputStream entityStream)
             throws IOException
Specified by:
writeTo in interface javax.ws.rs.ext.MessageBodyWriter<Source>
Throws:
IOException


Copyright © 2007-2014, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.