org.openrdf.http.object.writers
Class HttpMessageWriter

java.lang.Object
  extended by org.openrdf.http.object.writers.HttpMessageWriter
All Implemented Interfaces:
MessageBodyWriter<org.apache.http.HttpMessage>

public class HttpMessageWriter
extends Object
implements MessageBodyWriter<org.apache.http.HttpMessage>

Writes HttpMessage objects to message/http streams.

Author:
James Leigh

Constructor Summary
HttpMessageWriter()
           
 
Method Summary
 String getContentType(String mimeType, Class<?> type, Type genericType, ObjectFactory of, Charset charset)
           
 long getSize(String mimeType, Class<?> type, Type genericType, ObjectFactory of, org.apache.http.HttpMessage result, Charset charset)
           
 boolean isText(String mimeType, Class<?> type, Type genericType, ObjectFactory of)
           
 boolean isWriteable(String mimeType, Class<?> type, Type genericType, ObjectFactory of)
           
 ReadableByteChannel write(String mimeType, Class<?> ctype, Type genericType, ObjectFactory of, org.apache.http.HttpMessage msg, String base, Charset charset)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpMessageWriter

public HttpMessageWriter()
Method Detail

isText

public boolean isText(String mimeType,
                      Class<?> type,
                      Type genericType,
                      ObjectFactory of)
Specified by:
isText in interface MessageBodyWriter<org.apache.http.HttpMessage>

getContentType

public String getContentType(String mimeType,
                             Class<?> type,
                             Type genericType,
                             ObjectFactory of,
                             Charset charset)
Specified by:
getContentType in interface MessageBodyWriter<org.apache.http.HttpMessage>

getSize

public long getSize(String mimeType,
                    Class<?> type,
                    Type genericType,
                    ObjectFactory of,
                    org.apache.http.HttpMessage result,
                    Charset charset)
Specified by:
getSize in interface MessageBodyWriter<org.apache.http.HttpMessage>

isWriteable

public boolean isWriteable(String mimeType,
                           Class<?> type,
                           Type genericType,
                           ObjectFactory of)
Specified by:
isWriteable in interface MessageBodyWriter<org.apache.http.HttpMessage>

write

public ReadableByteChannel write(String mimeType,
                                 Class<?> ctype,
                                 Type genericType,
                                 ObjectFactory of,
                                 org.apache.http.HttpMessage msg,
                                 String base,
                                 Charset charset)
                          throws IOException,
                                 OpenRDFException,
                                 XMLStreamException,
                                 TransformerException,
                                 ParserConfigurationException
Specified by:
write in interface MessageBodyWriter<org.apache.http.HttpMessage>
Throws:
IOException
OpenRDFException
XMLStreamException
TransformerException
ParserConfigurationException


Copyright © 2004-2010 James Leigh Services Inc.. All Rights Reserved.