|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectphp.java.bridge.http.HttpRequest
public class HttpRequest
A simple HTTP request implementation.
| Constructor Summary | |
|---|---|
HttpRequest(java.io.InputStream inputStream)
Create a new HTTP request |
|
| Method Summary | |
|---|---|
void |
addHeader(java.lang.String line)
Add a header |
void |
close()
Close the request |
java.lang.String |
getHeader(java.lang.String string)
Returns the header value |
java.io.InputStream |
getInputStream()
Returns the InputStream |
java.lang.String |
getMethod()
Return the request Method |
java.lang.String |
getRequestURI()
Return the request URI |
void |
pushBack(byte[] buf,
int start,
int length)
Push back some bytes so that we can read them again. |
void |
setContentLength(int contentLength)
Set the content length, it causes the InputStream to stop reading at some point. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HttpRequest(java.io.InputStream inputStream)
inputStream - The InputStream| Method Detail |
|---|
public java.lang.String getHeader(java.lang.String string)
string - The header
public java.lang.String getMethod()
public java.lang.String getRequestURI()
public java.io.InputStream getInputStream()
public void pushBack(byte[] buf,
int start,
int length)
buf - The bufferstart - The start positionlength - The number of bytespublic void addHeader(java.lang.String line)
line - A valid HTTP header, e.g. "Host: localhost"public void setContentLength(int contentLength)
contentLength - The content length.getInputStream()
public void close()
throws java.io.IOException
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||