|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
java.io.FilterInputStream
java.io.BufferedInputStream
org.apache.felix.mosgi.jmx.httpconnector.mx4j.tools.adaptor.http.HttpInputStream
public class HttpInputStream
HttpInputStream processes an HTTP request
Field Summary |
---|
Fields inherited from class java.io.BufferedInputStream |
---|
buf, count, marklimit, markpos, pos |
Fields inherited from class java.io.FilterInputStream |
---|
in |
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 |
Methods inherited from class java.io.BufferedInputStream |
---|
available, close, mark, markSupported, read, read, reset, skip |
Methods inherited from class java.io.FilterInputStream |
---|
read |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HttpInputStream(InputStream in)
in
- InputStreamMethod Detail |
---|
public String getMethod()
public String getPath()
public String getQueryString()
public float getVersion()
public String getHeader(String name)
name
- Name of the header
public Map getHeaders()
name
- Name of the header
public void readRequest() throws IOException
IOException
- Description of Exceptionpublic String readLine() throws IOException
IOException
- Emmited in case of errors reading the streampublic Map getVariables()
public String getVariable(String name)
public String[] getVariableValues(String name)
protected void parseVariables() throws HttpException
HttpException
protected void parseMethod(String method) throws HttpException
method
- Description of Parameter
HttpException
- Description of Exceptionprotected void parseRequest(String request) throws HttpException
request
- Request string
HttpException
- Thrown if an error ocurrprotected void parseVersion(String verStr) throws HttpException
verStr
- String containing the HTTP version
HttpException
protected void readHeaders() throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |