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

java.lang.Object
  extended by org.glassfish.jersey.message.internal.SourceProvider.SaxSourceReader
All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyReader<javax.xml.transform.sax.SAXSource>
Enclosing class:
SourceProvider

@Produces(value={"application/xml","text/xml","*/*"})
@Consumes(value={"application/xml","text/xml","*/*"})
@Singleton
public static final class SourceProvider.SaxSourceReader
extends java.lang.Object
implements javax.ws.rs.ext.MessageBodyReader<javax.xml.transform.sax.SAXSource>

Provider for un-marshalling SAXSource instances.


Constructor Summary
SourceProvider.SaxSourceReader(javax.inject.Provider<javax.xml.parsers.SAXParserFactory> spf)
           
 
Method Summary
 boolean isReadable(java.lang.Class<?> t, java.lang.reflect.Type gt, java.lang.annotation.Annotation[] as, javax.ws.rs.core.MediaType mediaType)
           
 javax.xml.transform.sax.SAXSource readFrom(java.lang.Class<javax.xml.transform.sax.SAXSource> 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.String> httpHeaders, java.io.InputStream entityStream)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SourceProvider.SaxSourceReader

public SourceProvider.SaxSourceReader(@Context
                                      javax.inject.Provider<javax.xml.parsers.SAXParserFactory> spf)
Method Detail

isReadable

public boolean isReadable(java.lang.Class<?> t,
                          java.lang.reflect.Type gt,
                          java.lang.annotation.Annotation[] as,
                          javax.ws.rs.core.MediaType mediaType)
Specified by:
isReadable in interface javax.ws.rs.ext.MessageBodyReader<javax.xml.transform.sax.SAXSource>

readFrom

public javax.xml.transform.sax.SAXSource readFrom(java.lang.Class<javax.xml.transform.sax.SAXSource> 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.String> httpHeaders,
                                                  java.io.InputStream entityStream)
                                           throws java.io.IOException
Specified by:
readFrom in interface javax.ws.rs.ext.MessageBodyReader<javax.xml.transform.sax.SAXSource>
Throws:
java.io.IOException


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