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
 Object getEntity()
           
 Set<String> getLocations()
           
 Collection<? extends MimeType> getReadableTypes(Class<?> type, Type genericType, Accepter accepter)
           
 long getSize(String mimeType, Charset charset)
           
 boolean isNoContent()
           
<T> T
read(Class<T> type, Type genericType, String[] mediaTypes)
           
 String toString()
           
 ReadableByteChannel write(String mimeType, Charset charset)
           
 
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

getEntity

public Object getEntity()

getReadableTypes

public Collection<? extends MimeType> getReadableTypes(Class<?> type,
                                                       Type genericType,
                                                       Accepter accepter)
                                                throws MimeTypeParseException
Specified by:
getReadableTypes in interface Entity
Throws:
MimeTypeParseException

read

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

isNoContent

public boolean isNoContent()

getLocations

public Set<String> getLocations()

getSize

public long getSize(String mimeType,
                    Charset charset)

write

public ReadableByteChannel write(String mimeType,
                                 Charset charset)
                          throws IOException,
                                 OpenRDFException,
                                 XMLStreamException,
                                 TransformerException,
                                 ParserConfigurationException
Throws:
IOException
OpenRDFException
XMLStreamException
TransformerException
ParserConfigurationException


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