mx4j.tools.adaptor.http
public class HttpInputStream extends BufferedInputStream
Version: $Revision: 1.3 $
Constructor Summary | |
---|---|
HttpInputStream(InputStream in)
Constructs a new HttpInputStream
|
Method Summary | |
---|---|
String | getHeader(String name)
Returns a given header by name, assumes lower case
|
Map | getHeaders()
Returns a given header by name, assumes lower case
|
String | getMethod()
Returns the method of the request
|
String | getPath()
Returns the path of the request
|
String | getQueryString()
Returns the query string
|
String | getVariable(String name)
Returns one variable value. |
Map | getVariables()
Returns a map with the variables passed in the request.
|
String[] | getVariableValues(String name)
Returns one variable values.
|
float | getVersion()
Returns the version of the request
|
protected void | parseMethod(String method)
Parses the connection method. |
protected void | parseRequest(String request)
Parses the request
|
protected void | parseVariables()
Parses the request parameters |
protected void | parseVersion(String verStr)
Parses the request HttpConstants version
|
protected void | readHeaders()
Reads the headers
|
String | readLine()
Reads an HTTP line
|
void | readRequest()
Reads the request parsing the headers
|
Parameters: in InputStream
Parameters: name Name of the header
Returns: The header value
Parameters: name Name of the header
Returns: The header value
Returns: the method of the request GET/POST
Returns: the path of the request
Returns: The queryString value
Returns: A String with the variable value
Returns: A map containing variables/value pairs. If a variable is present only once in the request the value will be a String. If it is present many times the variable will be a String[]
Returns: A String array with all variable instances
Returns: The version value 1.0/1.1
Parameters: method Description of Parameter
Throws: HttpException Description of Exception
Parameters: request Request string
Throws: HttpException Thrown if an error ocurr
Parameters: verStr String containing the HTTP version
Throws: HttpException
Throws: IOException
Returns: A read line
Throws: IOException Emmited in case of errors reading the stream
Throws: IOException Description of Exception