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

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

public static final class SourceProvider.SourceWriter
extends java.lang.Object
implements MessageBodyWriter<javax.xml.transform.Source>

Provider for marshaling Source instances.


Constructor Summary
SourceProvider.SourceWriter(org.glassfish.hk2.Factory<javax.xml.parsers.SAXParserFactory> spf, org.glassfish.hk2.Factory<javax.xml.transform.TransformerFactory> tf)
           
 
Method Summary
 long getSize(javax.xml.transform.Source o, java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, MediaType mediaType)
           
 boolean isWriteable(java.lang.Class<?> t, java.lang.reflect.Type gt, java.lang.annotation.Annotation[] as, MediaType mediaType)
           
 void writeTo(javax.xml.transform.Source source, java.lang.Class<?> t, java.lang.reflect.Type gt, java.lang.annotation.Annotation[] as, MediaType mediaType, MultivaluedMap<java.lang.String,java.lang.Object> httpHeaders, java.io.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.Factory<javax.xml.parsers.SAXParserFactory> spf,
                                   @Context
                                   org.glassfish.hk2.Factory<javax.xml.transform.TransformerFactory> tf)
Method Detail

isWriteable

public boolean isWriteable(java.lang.Class<?> t,
                           java.lang.reflect.Type gt,
                           java.lang.annotation.Annotation[] as,
                           MediaType mediaType)
Specified by:
isWriteable in interface 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,
                    MediaType mediaType)
Specified by:
getSize in interface 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,
                    MediaType mediaType,
                    MultivaluedMap<java.lang.String,java.lang.Object> httpHeaders,
                    java.io.OutputStream entityStream)
             throws java.io.IOException
Specified by:
writeTo in interface MessageBodyWriter<javax.xml.transform.Source>
Throws:
java.io.IOException


Copyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.