org.apache.webdav.lib.methods
Class PostMethod

java.lang.Object
  |
  +--org.apache.webdav.lib.methods.WebdavMethodBase
        |
        +--org.apache.webdav.lib.methods.GetMethod
              |
              +--org.apache.webdav.lib.methods.PostMethod
All Implemented Interfaces:
WebdavMethod

public class PostMethod
extends GetMethod

POST Method.

Author:
Remy Maucherat

Field Summary
(package private)  java.util.Hashtable parameters
          Parameters hashtable.
protected static java.lang.String POST
           
 
Fields inherited from class org.apache.webdav.lib.methods.GetMethod
fileData, memoryData, TEMP_DIR, tempDir, tempFile, useDisk
 
Fields inherited from class org.apache.webdav.lib.methods.WebdavMethodBase
debug, headers, name, path, query, state, statusCode, statusText
 
Fields inherited from interface org.apache.webdav.lib.methods.WebdavMethod
PROTOCOL
 
Constructor Summary
PostMethod()
          Method constructor.
PostMethod(java.lang.String path)
          Method constructor.
PostMethod(java.lang.String path, boolean useDisk, java.lang.String tempDir)
          Method constructor.
PostMethod(java.lang.String path, boolean useDisk, java.lang.String tempDir, java.lang.String tempFile)
          Method constructor.
PostMethod(java.lang.String path, java.lang.String tempDir)
          Method constructor.
 
Method Summary
 void addParameter(java.lang.String name, java.lang.String value)
          Add parameter.
 void generateHeaders(java.lang.String host, State state)
          Generate additional headers needed by the request.
 java.lang.String generateQuery()
          Generate the query body.
 void parseResponse(java.io.InputStream is)
          Parse response.
 void recycle()
          Recycle the method object, so that it can be reused again.
 
Methods inherited from class org.apache.webdav.lib.methods.GetMethod
followRedirects, getData, getDataAsString, getFileData, getTempDir, getTempFile, getUseDisk, needContentLength, setFileData, setTempDir, setTempFile, setUseDisk
 
Methods inherited from class org.apache.webdav.lib.methods.WebdavMethodBase
checkNotUsed, checkUsed, generateHeaders, generateRequestLine, getHeader, getHeaders, getName, getPath, getStatusCode, getStatusText, hasBeenUsed, isStreamedQuery, processResponseHeaders, removeHeader, setDebug, setHeader, setPath, setQuery, setState, setStatusCode, setStatusText, setUsed, streamQuery, validate
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

POST

protected static final java.lang.String POST

parameters

java.util.Hashtable parameters
Parameters hashtable.
Constructor Detail

PostMethod

public PostMethod()
Method constructor.

PostMethod

public PostMethod(java.lang.String path)
Method constructor.

PostMethod

public PostMethod(java.lang.String path,
                  java.lang.String tempDir)
Method constructor.

PostMethod

public PostMethod(java.lang.String path,
                  boolean useDisk,
                  java.lang.String tempDir)
Method constructor.

PostMethod

public PostMethod(java.lang.String path,
                  boolean useDisk,
                  java.lang.String tempDir,
                  java.lang.String tempFile)
Method constructor.
Method Detail

addParameter

public void addParameter(java.lang.String name,
                         java.lang.String value)
Add parameter.

recycle

public void recycle()
Description copied from class: WebdavMethodBase
Recycle the method object, so that it can be reused again. Any attempt to reuse an object without recycling it will throw a WebdavException.
Overrides:
recycle in class WebdavMethodBase

generateHeaders

public void generateHeaders(java.lang.String host,
                            State state)
Generate additional headers needed by the request.
Overrides:
generateHeaders in class WebdavMethodBase
Parameters:
host - the host
state - State token

generateQuery

public java.lang.String generateQuery()
Generate the query body.
Overrides:
generateQuery in class GetMethod
Returns:
String query

parseResponse

public void parseResponse(java.io.InputStream is)
                   throws java.io.IOException
Parse response.
Overrides:
parseResponse in class GetMethod
Parameters:
is - Input stream