org.openrdf.http.object.writers
Class DatatypeWriter

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

public class DatatypeWriter
extends Object
implements MessageBodyWriter<Object>

Writes RDF Object datatypes.

Author:
James Leigh

Constructor Summary
DatatypeWriter()
           
 
Method Summary
 String getContentType(MessageType mtype, Charset charset)
           
 long getSize(MessageType mtype, Object result, Charset charset)
           
 boolean isText(MessageType mtype)
           
 boolean isWriteable(MessageType mtype)
           
 ReadableByteChannel write(MessageType mtype, Object result, String base, Charset charset)
           
 void writeTo(MessageType mtype, Object object, String base, Charset charset, OutputStream out, int bufSize)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatatypeWriter

public DatatypeWriter()
Method Detail

isText

public boolean isText(MessageType mtype)
Specified by:
isText in interface MessageBodyWriter<Object>

getSize

public long getSize(MessageType mtype,
                    Object result,
                    Charset charset)
Specified by:
getSize in interface MessageBodyWriter<Object>

isWriteable

public boolean isWriteable(MessageType mtype)
Specified by:
isWriteable in interface MessageBodyWriter<Object>

getContentType

public String getContentType(MessageType mtype,
                             Charset charset)
Specified by:
getContentType in interface MessageBodyWriter<Object>

write

public ReadableByteChannel write(MessageType mtype,
                                 Object result,
                                 String base,
                                 Charset charset)
                          throws IOException,
                                 OpenRDFException,
                                 XMLStreamException,
                                 TransformerException,
                                 ParserConfigurationException
Specified by:
write in interface MessageBodyWriter<Object>
Throws:
IOException
OpenRDFException
XMLStreamException
TransformerException
ParserConfigurationException

writeTo

public void writeTo(MessageType mtype,
                    Object object,
                    String base,
                    Charset charset,
                    OutputStream out,
                    int bufSize)
             throws IOException
Throws:
IOException


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