org.apache.stanbol.entityhub.jersey.writers
Class RepresentationWriter

java.lang.Object
  extended by org.apache.stanbol.entityhub.jersey.writers.RepresentationWriter
All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyWriter<Representation>

@Provider
public class RepresentationWriter
extends java.lang.Object
implements javax.ws.rs.ext.MessageBodyWriter<Representation>


Field Summary
static java.lang.String DEFAULT_ENCODING
           
protected  javax.servlet.ServletContext servletContext
           
static java.util.Set<java.lang.String> supportedMediaTypes
           
 
Constructor Summary
RepresentationWriter()
           
 
Method Summary
 long getSize(Representation t, java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
           
 boolean isWriteable(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
           
 void writeTo(Representation rep, java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.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
 

Field Detail

supportedMediaTypes

public static final java.util.Set<java.lang.String> supportedMediaTypes

DEFAULT_ENCODING

public static final java.lang.String DEFAULT_ENCODING
See Also:
Constant Field Values

servletContext

@Context
protected javax.servlet.ServletContext servletContext
Constructor Detail

RepresentationWriter

public RepresentationWriter()
Method Detail

getSize

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

isWriteable

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

writeTo

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


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