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

java.lang.Object
  extended by org.apache.clerezza.triaxrs.providers.provided.StringMessageBodyWriter
All Implemented Interfaces:
Comparable, javax.ws.rs.ext.MessageBodyWriter<String>

public final class StringMessageBodyWriter
extends Object
implements javax.ws.rs.ext.MessageBodyWriter<String>, Comparable

message body writer for string

Author:
szalay

Field Summary
static Charset UTF8
           
 
Constructor Summary
StringMessageBodyWriter()
           
 
Method Summary
 int compareTo(Object o)
           
 long getSize(String string, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
           
 boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
           
 String toString()
           
 void writeTo(String value, Class<?> arg1, Type arg2, Annotation[] arg3, javax.ws.rs.core.MediaType arg4, javax.ws.rs.core.MultivaluedMap<String,Object> arg5, OutputStream out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

UTF8

public static final Charset UTF8
Constructor Detail

StringMessageBodyWriter

public StringMessageBodyWriter()
Method Detail

compareTo

public int compareTo(Object o)
Specified by:
compareTo in interface Comparable

getSize

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

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<String>

writeTo

public void writeTo(String value,
                    Class<?> arg1,
                    Type arg2,
                    Annotation[] arg3,
                    javax.ws.rs.core.MediaType arg4,
                    javax.ws.rs.core.MultivaluedMap<String,Object> arg5,
                    OutputStream out)
             throws IOException,
                    javax.ws.rs.WebApplicationException
Specified by:
writeTo in interface javax.ws.rs.ext.MessageBodyWriter<String>
Throws:
IOException
javax.ws.rs.WebApplicationException

toString

public String toString()
Overrides:
toString in class Object


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