public class HttpPost extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
CONFIG_FILE |
static int |
DEFAULT_MAX_IN_MEMORY_PARAMETER_SIZE |
static int |
DEFAULT_MAX_PARAMETER_SIZE |
static int |
DEFAULT_MAX_REQUEST_SIZE |
static String |
MAX_IN_MEMORY_PARAMETER_SIZE_PROPERTY |
static String |
MAX_PARAMETER_SIZE_PROPERTY |
static String |
MAX_REQUEST_SIZE_PROPERTY |
(package private) int |
maxLoop |
static String |
UPLOAD_DIR_PROPERTY |
| Constructor and Description |
|---|
HttpPost(javax.servlet.http.HttpServletRequest req)
Initialise WorkerPostHandler
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkPostMultiParameter(String name)
This method checks if the parameter is a multivalued one
(as returned by a multiple select form) it returns true
if so and false if not.
|
protected void |
finalize()
Destuctor removes the tmp-files
|
Vector<Object> |
getPostMultiParameter(String name)
This method returns the value of the postparameter as a Vector.
|
Vector<Object> |
getPostMultiParameter(String name,
String encoding)
This method returns the value of the postparameter as a Vector.
|
String |
getPostParameter(String name)
This method returns the value of the postparameter as a String.
|
byte[] |
getPostParameterBytes(String name)
This method returns the value of the postparameter as a String.
|
String |
getPostParameterFile(String name)
This method returns the filename containing the postparametervalue
If it is a parameter with multiple values it returns the first one.
|
Hashtable<String,Object> |
getPostParameters()
This method returns the Hashtable containing the POST information.
|
boolean |
isPostedToFile() |
byte[] |
readContentLength(javax.servlet.http.HttpServletRequest req)
read a block into a array of ContentLenght size from the users networksocket
|
boolean |
readPostFormData(byte[] postbuffer,
Hashtable<String,Object> post_header,
String line)
read post info from buffer, must be defined in multipart/form-data format.
|
boolean |
readPostFormData(String formFile,
Hashtable<String,Object> post_header,
String line)
read post info from buffer, must be defined in multipart/form-data format.
|
void |
reset()
resets WorkerPosthandler
|
public static final String CONFIG_FILE
public static final String MAX_REQUEST_SIZE_PROPERTY
public static final String MAX_IN_MEMORY_PARAMETER_SIZE_PROPERTY
public static final String MAX_PARAMETER_SIZE_PROPERTY
public static final String UPLOAD_DIR_PROPERTY
public static final int DEFAULT_MAX_REQUEST_SIZE
public static final int DEFAULT_MAX_PARAMETER_SIZE
public static final int DEFAULT_MAX_IN_MEMORY_PARAMETER_SIZE
int maxLoop
public HttpPost(javax.servlet.http.HttpServletRequest req)
protected void finalize()
public void reset()
public boolean checkPostMultiParameter(String name) throws PostValueToLargeException
public Hashtable<String,Object> getPostParameters() throws PostValueToLargeException
public byte[] getPostParameterBytes(String name) throws PostValueToLargeException
PostValueToLargeException - will be thrown when the postParameterValue
is saved on disk instead of memory.getPostMultiParameter(java.lang.String),
checkPostMultiParameter(java.lang.String)public Vector<Object> getPostMultiParameter(String name) throws PostValueToLargeException
PostValueToLargeExceptioncheckPostMultiParameter(java.lang.String)public Vector<Object> getPostMultiParameter(String name, String encoding) throws PostValueToLargeException
PostValueToLargeExceptioncheckPostMultiParameter(java.lang.String)public boolean isPostedToFile()
public String getPostParameterFile(String name) throws PostValueToLargeException
public String getPostParameter(String name) throws PostValueToLargeException
public byte[] readContentLength(javax.servlet.http.HttpServletRequest req)
throws PostValueToLargeException
PostValueToLargeExceptionpublic boolean readPostFormData(byte[] postbuffer,
Hashtable<String,Object> post_header,
String line)
postbuffer - buffer with the postbuffer informationpost_header - hashtable to put the postbuffer information inpublic boolean readPostFormData(String formFile, Hashtable<String,Object> post_header, String line)
formFile - buffer with the postbuffer informationpost_header - hashtable to put the fromFile information inMMBase 1.9-SNAPSHOT - ${javadoctimestamp}