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(MessageType mtype, Charset charset)
           
 long getSize(MessageType mtype, org.apache.http.HttpMessage result, Charset charset)
           
 boolean isText(MessageType mtype)
           
 boolean isWriteable(MessageType mtype)
           
 ReadableByteChannel write(MessageType mtype, org.apache.http.HttpMessage result, 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(MessageType mtype)
Specified by:
isText in interface MessageBodyWriter<org.apache.http.HttpMessage>

getSize

public long getSize(MessageType mtype,
                    org.apache.http.HttpMessage result,
                    Charset charset)
Specified by:
getSize in interface MessageBodyWriter<org.apache.http.HttpMessage>

isWriteable

public boolean isWriteable(MessageType mtype)
Specified by:
isWriteable in interface MessageBodyWriter<org.apache.http.HttpMessage>

getContentType

public String getContentType(MessageType mtype,
                             Charset charset)
Specified by:
getContentType in interface MessageBodyWriter<org.apache.http.HttpMessage>

write

public ReadableByteChannel write(MessageType mtype,
                                 org.apache.http.HttpMessage result,
                                 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-2011 James Leigh Services Inc.. All Rights Reserved.