|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--prupp.HTTPHeader
Reads in a http-header (either a response or a request) and sets up for some nice handling of the header.
Constructor Summary | |
HTTPHeader()
Create a new HTTPHeader from scratch |
|
HTTPHeader(java.io.DataInputStream in)
Read in a HTTPHeader from an inputstream. |
Method Summary | |
java.lang.String |
getHeader(java.lang.String type)
get the value of header type |
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). |
boolean |
isHeadOnlyRequest()
Is this request for the head only? |
void |
removeHeader(java.lang.String type)
removes a headerline from this header |
void |
setHeader(java.lang.String type,
java.lang.String value)
Set or replaces a value for given type. |
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 java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
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.Method Detail |
public java.lang.String toString()
public java.lang.String getHeader(java.lang.String type)
type
- the Header were intrested in.public void setHeader(java.lang.String type, java.lang.String value)
type
- the type or category that we want to set.value
- the value we want to setpublic void removeHeader(java.lang.String type)
type
- the type we want to removepublic 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)
method
- the new URIpublic 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 reasonphrase
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |