|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.httpclient.HttpMethodBase
org.apache.webdav.lib.methods.HttpRequestBodyMethodBase
org.apache.webdav.lib.methods.XMLResponseMethodBase
Utility class for XML response parsing.
| Nested Class Summary | |
(package private) class |
XMLResponseMethodBase.OptionsResponse
|
class |
XMLResponseMethodBase.Response
An abstract class that models a DAV:response. |
(package private) class |
XMLResponseMethodBase.ResponseWithinMultistatus
A class that models the DAV:response element within a multistatus. |
(package private) class |
XMLResponseMethodBase.SingleResponse
|
| Field Summary | |
protected javax.xml.parsers.DocumentBuilder |
builder
Document builder. |
protected java.util.Vector |
responseURLs
Vector of response nodes, to keep track of insertion order FIXME: the above Hashtable and this Vector should be ported to plain Collections |
| Fields inherited from class org.apache.commons.httpclient.HttpMethodBase |
USER_AGENT |
| Constructor Summary | |
XMLResponseMethodBase()
Method constructor. |
|
XMLResponseMethodBase(java.lang.String uri)
Method constructor. |
|
| Method Summary | |
protected static Property |
convertElementToProperty(XMLResponseMethodBase.Response response,
org.w3c.dom.Element element)
This method creates a property implementation from an element. |
protected java.lang.String |
generateRequestBody()
DAV requests that contain a body must override this function to generate that body. |
int |
getDebug()
Debug property getter. |
protected int |
getRequestContentLength()
Return the length (in bytes) of my request body, suitable for use in a Content-Length header. |
org.w3c.dom.Document |
getResponseDocument()
Response document getter. |
protected java.util.Hashtable |
getResponseHashtable()
|
java.util.Enumeration |
getResponses()
Return an enumeration containing the responses. |
protected java.util.Vector |
getResponseURLs()
|
void |
parseResponse(java.io.InputStream input,
HttpState state,
HttpConnection conn)
Parse response. |
protected void |
parseXMLResponse(java.io.InputStream input)
|
protected void |
readResponseBody(HttpState state,
HttpConnection conn)
|
void |
recycle()
Reset the State of the class to its initial state, so that it can be used again. |
void |
setDebug(int debug)
Debug property setter. |
protected void |
setDocument(org.w3c.dom.Document doc)
|
protected void |
setResponseHashtable(java.util.Hashtable h)
|
protected boolean |
writeRequestBody(HttpState state,
HttpConnection conn)
Write the request body to the given HttpConnection.
|
| Methods inherited from class org.apache.webdav.lib.methods.HttpRequestBodyMethodBase |
isRequestContentAlreadySet, readContinueCode, setRequestBody, setRequestBody, setRequestBody, setRequestBody, setRequestBody |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected javax.xml.parsers.DocumentBuilder builder
protected java.util.Vector responseURLs
| Constructor Detail |
public XMLResponseMethodBase()
public XMLResponseMethodBase(java.lang.String uri)
uri - the URI to request| Method Detail |
public org.w3c.dom.Document getResponseDocument()
public java.util.Enumeration getResponses()
public void setDebug(int debug)
public int getDebug()
public void recycle()
recycle in interface HttpMethodrecycle in class HttpRequestBodyMethodBase
protected void readResponseBody(HttpState state,
HttpConnection conn)
throws java.io.IOException,
HttpException
java.io.IOException
HttpExceptionprotected int getRequestContentLength()
Return -1 when the content-length is unknown.
This implementation returns 0, indicating that the request has no body.
getRequestContentLength in class HttpRequestBodyMethodBaseprotected java.lang.String generateRequestBody()
The default behavior simply returns an empty body.
protected boolean writeRequestBody(HttpState state,
HttpConnection conn)
throws java.io.IOException,
HttpException
HttpConnection.
This implementation writes any computed body and returns true.
writeRequestBody in class HttpRequestBodyMethodBasestate - the client stateconn - the connection to write to
java.io.IOException - when i/o errors occur reading the response
HttpException - when a protocol error occurs or state is invalid
public void parseResponse(java.io.InputStream input,
HttpState state,
HttpConnection conn)
throws java.io.IOException,
HttpException
input - Input stream
java.io.IOException
HttpException
protected void parseXMLResponse(java.io.InputStream input)
throws java.io.IOException,
HttpException
java.io.IOException
HttpExceptionprotected java.util.Hashtable getResponseHashtable()
protected java.util.Vector getResponseURLs()
protected static Property convertElementToProperty(XMLResponseMethodBase.Response response,
org.w3c.dom.Element element)
org.apache.webdav.lib.properties package.
protected void setDocument(org.w3c.dom.Document doc)
protected void setResponseHashtable(java.util.Hashtable h)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||