nl.hippo.client.webdav
Class WebdavResponse

java.lang.Object
  extended by nl.hippo.client.webdav.WebdavResponse
All Implemented Interfaces:
Serializable, RawResponse

public class WebdavResponse
extends Object
implements RawResponse

Result class returned by the execute() method of WebdavMethod.

Implemented as a Value Object meaning:

See Also:
Serialized Form

Constructor Summary
WebdavResponse()
           
WebdavResponse(byte[] responseAsBytes)
           
WebdavResponse(int responseCode)
           
WebdavResponse(int responseCode, byte[] responseAsBytes, WebdavRequest request)
           
 
Method Summary
 boolean equals(Object obj)
           
 WebdavRequest getRequest()
           
 byte[] getResponseAsBytes()
           
 Document getResponseAsDom()
           
 String getResponseAsPrettyPrintedString(String encoding)
           
 InputStream getResponseAsStream()
           
 String getResponseAsString(String encoding)
           
 int getResponseCode()
          Returns the Http response code (207, 404, etc.)
 int hashCode()
           
 WebdavResponse interpolate(Map params)
           
 boolean isDocumentNotFound()
           
 boolean isValid()
           
 void streamResponseToSaxContentHandler(DefaultHandler handler)
           
 String toString()
           
 WebdavResponse transform(WebdavResponse xsl)
           
 WebdavResponse transform(WebdavResponse xsl, WebdavCacheHandler cache)
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WebdavResponse

public WebdavResponse()

WebdavResponse

public WebdavResponse(int responseCode)

WebdavResponse

public WebdavResponse(byte[] responseAsBytes)

WebdavResponse

public WebdavResponse(int responseCode,
                      byte[] responseAsBytes,
                      WebdavRequest request)
Method Detail

isValid

public boolean isValid()
Specified by:
isValid in interface RawResponse

isDocumentNotFound

public boolean isDocumentNotFound()

getResponseCode

public int getResponseCode()
Returns the Http response code (207, 404, etc.)

Specified by:
getResponseCode in interface RawResponse
Returns:
The Http response code (207, 404, etc.)

getRequest

public WebdavRequest getRequest()

getResponseAsBytes

public byte[] getResponseAsBytes()
Specified by:
getResponseAsBytes in interface RawResponse

getResponseAsStream

public InputStream getResponseAsStream()
Specified by:
getResponseAsStream in interface RawResponse

getResponseAsString

public String getResponseAsString(String encoding)
                           throws ClientException
Specified by:
getResponseAsString in interface RawResponse
Throws:
ClientException

getResponseAsPrettyPrintedString

public String getResponseAsPrettyPrintedString(String encoding)
                                        throws ClientException
Specified by:
getResponseAsPrettyPrintedString in interface RawResponse
Throws:
ClientException

getResponseAsDom

public Document getResponseAsDom()
                          throws ClientException
Specified by:
getResponseAsDom in interface RawResponse
Throws:
ClientException

streamResponseToSaxContentHandler

public void streamResponseToSaxContentHandler(DefaultHandler handler)
                                       throws ClientException
Specified by:
streamResponseToSaxContentHandler in interface RawResponse
Throws:
ClientException

transform

public WebdavResponse transform(WebdavResponse xsl)
                         throws ClientException
Throws:
ClientException

transform

public WebdavResponse transform(WebdavResponse xsl,
                                WebdavCacheHandler cache)
                         throws ClientException
Throws:
ClientException

interpolate

public WebdavResponse interpolate(Map params)

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2006-2009 Hippo. All Rights Reserved.