org.apache.abdera.protocol.client
Interface ClientResponse

All Superinterfaces:
Message, ProtocolConstants, Response
All Known Subinterfaces:
CachedResponse
All Known Implementing Classes:
AbstractClientResponse, CachedResponseBase, CommonsResponse, InMemoryCachedResponse

public interface ClientResponse
extends Response


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.abdera.protocol.Response
Response.ResponseType
 
Field Summary
 
Fields inherited from interface org.apache.abdera.protocol.util.ProtocolConstants
NOCACHE, NOSTORE, NOTRANSFORM, ONLYIFCACHED, PRIVATE, PROXYREVALIDATE, PUBLIC, REVALIDATE
 
Method Summary
 String getCharacterEncoding()
          Return the character set encoding specified in the ContentType header, if any
<T extends Element>
Document<T>
getDocument()
          If the response contains an XML document, parse the document
<T extends Element>
Document<T>
getDocument(Parser parser)
          If the response contains an XML document, parse the document using the specified Parser
<T extends Element>
Document<T>
getDocument(ParserOptions options)
          If the response contains an XML document, parse the document using the specified ParserOptions
<T extends Element>
Document<T>
getDocument(Parser parser, ParserOptions options)
          If the response contains an XML document, parse the document using the specified Parser and ParserOptions
 InputStream getInputStream()
          Returns the inputstream used to read data from this response
 String getMethod()
          Return the request method
 Reader getReader()
          Returns a reader used to read data from this response.
 Reader getReader(String charset)
          Returns a reader used to read data from this response.
 Date getServerDate()
          Return the server-specified date returned in the response
 String getUri()
          Return the request URI.
 void release()
          Release the resources associated with this response
 void setInputStream(InputStream in)
           
 
Methods inherited from interface org.apache.abdera.protocol.Response
getAge, getAllow, getContentLength, getEntityTag, getExpires, getLastModified, getLocation, getNoCacheHeaders, getPrivateHeaders, getSMaxAge, getStatus, getStatusText, getType, isMustRevalidate, isPrivate, isProxyRevalidate, isPublic
 
Methods inherited from interface org.apache.abdera.protocol.Message
getCacheControl, getContentLanguage, getContentLocation, getContentType, getDateHeader, getDecodedHeader, getDecodedHeaders, getHeader, getHeaderNames, getHeaders, getMaxAge, getSlug, isNoCache, isNoStore, isNoTransform
 

Method Detail

getMethod

String getMethod()
Return the request method


getUri

String getUri()
Return the request URI. The request was redirected, this will return the new URI


release

void release()
Release the resources associated with this response


getInputStream

InputStream getInputStream()
                           throws IOException
Returns the inputstream used to read data from this response

Throws:
IOException

getReader

Reader getReader()
                 throws IOException
Returns a reader used to read data from this response. Will use the character set declared in the Content-Type to create the reader

Throws:
IOException

getReader

Reader getReader(String charset)
                 throws IOException
Returns a reader used to read data from this response. Will use the character set specified to create the reader

Throws:
IOException

setInputStream

void setInputStream(InputStream in)

getDocument

<T extends Element> Document<T> getDocument()
                                        throws ParseException
If the response contains an XML document, parse the document

Throws:
ParseException

getDocument

<T extends Element> Document<T> getDocument(ParserOptions options)
                                        throws ParseException
If the response contains an XML document, parse the document using the specified ParserOptions

Throws:
ParseException

getDocument

<T extends Element> Document<T> getDocument(Parser parser)
                                        throws ParseException
If the response contains an XML document, parse the document using the specified Parser

Throws:
ParseException

getDocument

<T extends Element> Document<T> getDocument(Parser parser,
                                            ParserOptions options)
                                        throws ParseException
If the response contains an XML document, parse the document using the specified Parser and ParserOptions

Throws:
ParseException

getServerDate

Date getServerDate()
Return the server-specified date returned in the response


getCharacterEncoding

String getCharacterEncoding()
Return the character set encoding specified in the ContentType header, if any



Copyright © 2006-2010 Apache Software Foundation. All Rights Reserved.