public class HttpUtils
extends java.lang.Object
Constructor and Description |
---|
HttpUtils()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static java.lang.StringBuffer |
getRequestURL(HttpServletRequest request)
Deprecated.
|
static java.util.Hashtable<java.lang.String,java.lang.String[]> |
parsePostData(int contentLength,
ServletInputStream in)
Deprecated.
|
static java.util.Hashtable<java.lang.String,java.lang.String[]> |
parseQueryString(java.lang.String queryString)
Deprecated.
|
public static java.util.Hashtable<java.lang.String,java.lang.String[]> parseQueryString(java.lang.String queryString) throws java.lang.IllegalArgumentException
Results:
?a=b : key = "a", value = "b"
?a : key = "a", value = ""
?=b : key = "", value = "b"
queryString
- The queryString to processjava.lang.IllegalArgumentException
- If the queryString contains
an error it can't handle.public static java.util.Hashtable<java.lang.String,java.lang.String[]> parsePostData(int contentLength, ServletInputStream in) throws java.lang.IllegalArgumentException
bonus:
When contentLength < 0 it keeps on reading data until EOF
throws an IllegalArgumentException when contentLength != amount of data in the inputstream
java.lang.IllegalArgumentException
- If an IO error occurs or
the POST data contains an error it can't handle.public static java.lang.StringBuffer getRequestURL(HttpServletRequest request)