org.apache.clerezza.triaxrs.providers.provided
Class SourceProvider

java.lang.Object
  extended by org.apache.clerezza.triaxrs.providers.provided.SourceProvider
All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyWriter<Source>
Direct Known Subclasses:
SourceProvider.DOMSourceProvider, SourceProvider.SAXSourceProvider, SourceProvider.StreamSourceProvider

public abstract class SourceProvider
extends Object
implements javax.ws.rs.ext.MessageBodyWriter<Source>


Nested Class Summary
static class SourceProvider.DOMSourceProvider
           
static class SourceProvider.SAXSourceProvider
           
static class SourceProvider.StreamSourceProvider
           
 
Constructor Summary
SourceProvider()
           
 
Method Summary
 long getSize(Source t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
           
protected  boolean isReadable(javax.ws.rs.core.MediaType mediaType)
           
 boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
           
 void writeTo(Source t, Class<?> type, Type genericType, Annotation[] annotations, 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

public SourceProvider()
Method Detail

isReadable

protected boolean isReadable(javax.ws.rs.core.MediaType mediaType)

getSize

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

isWriteable

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

writeTo

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


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.