be.re.webdav
Class Client.Response

java.lang.Object
  extended by be.re.webdav.Client.Response
Enclosing class:
Client

public static class Client.Response
extends Object

Contains the response of a WebDAV operation.

Author:
Werner Donné

Constructor Summary
Client.Response(URL url, String method, Headers headers)
           
Client.Response(URL url, String method, Headers headers, InputStream body)
           
 
Method Summary
 void close()
          Frees the underlying resources.
 Document createDocument()
          Creates a DOM document from the response body.
 InputStream getBody()
          Returns the response body.
 Headers getHeaders()
          Returns the response headers.
 String getMethod()
          Returns the request method.
 int getStatusCode()
          Returns the status code.
 String getStatusMessage()
          Returns the status message in the status line of the response.
 URL getUrl()
          Returns the request URL.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Client.Response

public Client.Response(URL url,
                       String method,
                       Headers headers)
                throws IOException
Throws:
IOException

Client.Response

public Client.Response(URL url,
                       String method,
                       Headers headers,
                       InputStream body)
                throws IOException
Throws:
IOException
Method Detail

close

public void close()
           throws IOException
Frees the underlying resources. It should always be called afer consumption.

Throws:
IOException

createDocument

public Document createDocument()
                        throws IOException
Creates a DOM document from the response body. It can be called once. Subsequent calls to this method as well as the getBody method will return null.

Throws:
IOException

getBody

public InputStream getBody()
Returns the response body. It can be called once. Subsequent calls to this method as well as the createDocument method will return null.


getHeaders

public Headers getHeaders()
Returns the response headers.


getMethod

public String getMethod()
Returns the request method.


getStatusCode

public int getStatusCode()
Returns the status code.


getStatusMessage

public String getStatusMessage()
Returns the status message in the status line of the response.


getUrl

public URL getUrl()
Returns the request URL.