org.openrdf.http.object.model
Class ResponseEntity

java.lang.Object
  extended by org.openrdf.http.object.model.ResponseEntity
All Implemented Interfaces:
Entity

public class ResponseEntity
extends Object
implements Entity

Wraps a message response to output to an HTTP response.


Constructor Summary
ResponseEntity(String[] mimeTypes, Object result, Class<?> type, Type genericType, String base, ObjectConnection con)
           
 
Method Summary
 String getLocation()
           
 long getSize(String mimeType, Charset charset)
           
 boolean isNoContent()
           
 boolean isReadable(Class<?> type, Type genericType, String[] mediaTypes)
           
 boolean isRedirect()
           
 boolean isSeeOther()
           
<T> T
read(Class<T> type, Type genericType, String[] mediaTypes)
           
 String toString()
           
 void writeTo(String mimeType, Charset charset, OutputStream out, int bufSize)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ResponseEntity

public ResponseEntity(String[] mimeTypes,
                      Object result,
                      Class<?> type,
                      Type genericType,
                      String base,
                      ObjectConnection con)
Method Detail

toString

public String toString()
Overrides:
toString in class Object

isReadable

public boolean isReadable(Class<?> type,
                          Type genericType,
                          String[] mediaTypes)
                   throws MimeTypeParseException
Specified by:
isReadable in interface Entity
Throws:
MimeTypeParseException

read

public <T> T read(Class<T> type,
                  Type genericType,
                  String[] mediaTypes)
       throws QueryResultParseException,
              TupleQueryResultHandlerException,
              QueryEvaluationException,
              RepositoryException,
              TransformerConfigurationException,
              IOException,
              XMLStreamException,
              ParserConfigurationException,
              SAXException,
              TransformerException,
              MimeTypeParseException
Specified by:
read in interface Entity
Throws:
QueryResultParseException
TupleQueryResultHandlerException
QueryEvaluationException
RepositoryException
TransformerConfigurationException
IOException
XMLStreamException
ParserConfigurationException
SAXException
TransformerException
MimeTypeParseException

isRedirect

public boolean isRedirect()

isSeeOther

public boolean isSeeOther()

isNoContent

public boolean isNoContent()

getLocation

public String getLocation()

getSize

public long getSize(String mimeType,
                    Charset charset)

writeTo

public void writeTo(String mimeType,
                    Charset charset,
                    OutputStream out,
                    int bufSize)
             throws IOException,
                    OpenRDFException,
                    XMLStreamException,
                    TransformerException,
                    ParserConfigurationException
Throws:
IOException
OpenRDFException
XMLStreamException
TransformerException
ParserConfigurationException


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