|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object rabbit.http.GeneralHeader rabbit.http.HTTPHeader
A class to handle a HTTPHeader.
Field Summary |
Fields inherited from class rabbit.http.GeneralHeader |
CRLF |
Constructor Summary | |
HTTPHeader()
Create a new HTTPHeader from scratch |
|
HTTPHeader(java.io.DataInputStream in)
Read in a HTTPHeader from an inputstream. |
Method Summary | |
boolean |
equals(java.lang.Object o)
Is this Header equal to the other object? Two HTTPHeaders are assumed equal if the requesURI's are equal. |
java.lang.String |
getContent()
Get the content of the request/response. |
HTTPInputStream |
getContentStream()
|
java.lang.String |
getHTTPVersion()
Get the HTTP Version of this request (only valid for requests). |
java.lang.String |
getMethod()
Get the request method of this header (only valid for requests). |
java.lang.String |
getReasonPhrase()
Get the Reason phrase of the response (only valid for responses). |
java.lang.String |
getRequestLine()
Get the requestline of this header (only valid for requests). |
java.lang.String |
getRequestURI()
Get the requestURI of this request (only valid for requests). |
java.lang.String |
getResponseHTTPVersion()
Get the HTTP version of the response (only valid for responses). |
java.lang.String |
getStatusCode()
Get the Status code of the response (only valid for responses). |
java.lang.String |
getStatusLine()
Get the statusline of this header (only valid for responses). |
int |
hashCode()
Get the hashCode for this header. |
boolean |
isDot9Request()
Is this request a HTTP/0.9 type request? A 0.9 request doesnt have a full HTTPheader, only a requestline so we need to treat it differently. |
boolean |
isHeadOnlyRequest()
Is this request for the head only? |
boolean |
isRequest()
Try to guess if this header is a request. |
boolean |
isResponse()
Try to guess if this header is a response. |
boolean |
isSecure()
Try to guess if this header is a secure thing. |
void |
readHTTPHeader(java.io.DataInputStream in)
|
void |
setContent(java.lang.String content)
Set the Content for the request/response Mostly not used for responses. |
void |
setContentStream(HTTPInputStream in)
Set the content for the request/response This is a way to set up handling of a chunked input request As a side effect the "Transer-Encoding" header is also set. |
void |
setHTTPVersion(java.lang.String version)
Set the HTTP Version to use for request. |
void |
setMehtod(java.lang.String method)
Sets the request method of this header |
void |
setReasonPhrase(java.lang.String reason)
Set the reason phrase for this reqponse. |
void |
setRequestLine(java.lang.String line)
Set the requestline of this header |
void |
setRequestURI(java.lang.String requestURI)
Sets the request URI of this header |
void |
setResponseHTTPVersion(java.lang.String httpVersion)
Set the HTTP version for this response. |
void |
setStatusCode(java.lang.String status)
Set the Status code for this response. |
void |
setStatusLine(java.lang.String line)
Set the statusline of this header. |
java.lang.String |
toString()
get the text value of this header |
Methods inherited from class rabbit.http.GeneralHeader |
addHeader, copyHeader, getHeader, getHeaders, readHeader, readHeader, readLine, removeHeader, removeValue, setExistingValue, setHeader |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public HTTPHeader()
public HTTPHeader(java.io.DataInputStream in) throws java.io.IOException
in
- the stream from which this header is read.
java.io.IOException
- if reading from in results in exceptions.Method Detail |
public void readHTTPHeader(java.io.DataInputStream in) throws java.io.IOException
java.io.IOException
public java.lang.String toString()
toString
in class GeneralHeader
public java.lang.String getStatusLine()
public void setStatusLine(java.lang.String line)
line
- a Status-Line )RFC 2068: 6.1)public java.lang.String getRequestLine()
public void setRequestLine(java.lang.String line)
line
- a Request-Line (RFC 2068: 5.1)public boolean isHeadOnlyRequest()
public java.lang.String getMethod()
public void setMehtod(java.lang.String method)
method
- the new requestmethodpublic java.lang.String getRequestURI()
public void setRequestURI(java.lang.String requestURI)
public java.lang.String getHTTPVersion()
public void setHTTPVersion(java.lang.String version)
version
- the version to use.public java.lang.String getResponseHTTPVersion()
public void setResponseHTTPVersion(java.lang.String httpVersion)
httpVersion
- the version to use.public java.lang.String getStatusCode()
public void setStatusCode(java.lang.String status)
status
- the new status code.public java.lang.String getReasonPhrase()
public void setReasonPhrase(java.lang.String reason)
reason
- the new reasonphrasepublic void setContent(java.lang.String content)
content
- the binary content.public void setContentStream(HTTPInputStream in)
public HTTPInputStream getContentStream()
public java.lang.String getContent()
public boolean isDot9Request()
public int hashCode()
public boolean equals(java.lang.Object o)
o
- the Object to compare to.
public boolean isRequest()
public boolean isResponse()
public boolean isSecure()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |