|
||||||||||
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
public class HttpHeader
A class to handle http headers.
Field Summary |
---|
Fields inherited from class rabbit.http.GeneralHeader |
---|
headers |
Constructor Summary | |
---|---|
HttpHeader()
Create a new HTTPHeader from scratch |
Method Summary | |
---|---|
boolean |
equals(Object o)
Is this Header equal to the other object? |
protected void |
fillBuffer(StringBuilder sb)
Fill the given StringBuilder with text from this header. |
String |
getContent()
Get the current content for this request/response. |
String |
getHTTPVersion()
Get the HTTP Version of this request (only valid for requests). |
String |
getMethod()
Get the request method of this header (only valid for requests). |
String |
getReasonPhrase()
Get the Reason phrase of the response (only valid for responses). |
String |
getRequestLine()
Get the requestline of this header (only valid for requests). |
String |
getRequestURI()
Get the requestURI of this request (only valid for requests). |
String |
getResponseHTTPVersion()
Get the HTTP version of the response (only valid for responses). |
String |
getStatusCode()
Get the Status code of the response (only valid for responses). |
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? |
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. |
boolean |
isSSLRequest()
Check to see if this header is an SSL header. |
void |
read(DataInput in)
Fill in this object with data from the given input. |
void |
setContent(String content)
Set the Content for the request/response Mostly not used for responses. |
void |
setHTTPVersion(String version)
Set the HTTP Version to use for request. |
void |
setMehtod(String method)
Sets the request method of this header |
void |
setReasonPhrase(String reason)
Set the reason phrase for this reqponse. |
void |
setRequestLine(String line)
Set the requestline of this header |
void |
setRequestURI(String requestURI)
Sets the request URI of this header |
void |
setResponseHTTPVersion(String httpVersion)
Set the HTTP version for this response. |
void |
setStatusCode(String status)
Set the Status code for this response. |
void |
setStatusLine(String line)
Set the statusline of this header. |
void |
write(DataOutput out)
Write this object to the given output. |
Methods inherited from class rabbit.http.GeneralHeader |
---|
addHeader, addHeader, copyHeader, getHeader, getHeaders, removeHeader, removeValue, setExistingValue, setHeader, size, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public HttpHeader()
Method Detail |
---|
protected void fillBuffer(StringBuilder sb)
GeneralHeader
fillBuffer
in class GeneralHeader
public String getStatusLine()
public void setStatusLine(String line)
line
- a Status-Line )RFC 2068: 6.1)public String getRequestLine()
public void setRequestLine(String line)
line
- a Request-Line (RFC 2068: 5.1)public boolean isHeadOnlyRequest()
public String getMethod()
public void setMehtod(String method)
method
- the new requestmethodpublic boolean isSSLRequest()
public String getRequestURI()
public void setRequestURI(String requestURI)
requestURI
- the new URIpublic String getHTTPVersion()
public void setHTTPVersion(String version)
version
- the version to use.public String getResponseHTTPVersion()
public void setResponseHTTPVersion(String httpVersion)
httpVersion
- the version to use.public String getStatusCode()
public void setStatusCode(String status)
status
- the new status code.public String getReasonPhrase()
public void setReasonPhrase(String reason)
reason
- the new reasonphrasepublic boolean isDot9Request()
public int hashCode()
hashCode
in class Object
public boolean equals(Object o)
equals
in class Object
o
- the Object to compare to.
public boolean isRequest()
public boolean isResponse()
public boolean isSecure()
public void setContent(String content)
content
- the binary content.public String getContent()
public void read(DataInput in) throws IOException
Storable
read
in interface Storable
read
in class GeneralHeader
IOException
public void write(DataOutput out) throws IOException
Storable
write
in interface Storable
write
in class GeneralHeader
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |