|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectrabbit.http.GeneralHeader
A class to handle a general Header.
| Field Summary | |
static java.lang.String |
CRLF
The String consisting of \r and \n |
| Constructor Summary | |
GeneralHeader()
Create a new HTTPHeader from scratch |
|
GeneralHeader(java.io.DataInputStream in)
Create a new HTTPHeader from scratch |
|
| Method Summary | |
void |
addHeader(java.lang.String type,
java.lang.String value)
Add a new header. |
void |
copyHeader(GeneralHeader to)
Copy all headers in this header to the given header. |
java.lang.String |
getHeader(java.lang.String type)
get the value of header type |
java.util.Vector |
getHeaders(java.lang.String type)
Get all headers of a specified type... |
void |
readHeader(java.io.DataInputStream in)
Read in this header from the given Stream. |
void |
readHeader(java.io.DataInputStream in,
java.lang.String firstline)
Read in this header from the given Stream. |
static java.lang.String |
readLine(java.io.DataInputStream in)
|
void |
removeHeader(java.lang.String type)
removes a headerline from this header |
void |
removeValue(java.lang.String value)
removes a header with the specified value |
void |
setExistingValue(java.lang.String current,
java.lang.String newValue)
Set a specified header |
void |
setHeader(java.lang.String type,
java.lang.String value)
Set or replaces a value for given type. |
java.lang.String |
toString()
Get the text value of this header |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.String CRLF
| Constructor Detail |
public GeneralHeader()
public GeneralHeader(java.io.DataInputStream in)
throws java.io.IOException
| Method Detail |
public void readHeader(java.io.DataInputStream in)
throws java.io.IOException
in - the Stream to read the header from.
java.io.IOException
public static java.lang.String readLine(java.io.DataInputStream in)
throws java.io.IOException
java.io.IOException
public void readHeader(java.io.DataInputStream in,
java.lang.String firstline)
throws java.io.IOException
in - the Stream to read the header from.firstline - the first line of this header.
java.io.IOExceptionpublic 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 set
public void setExistingValue(java.lang.String current,
java.lang.String newValue)
public void addHeader(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 void removeValue(java.lang.String value)
value - the value of the header we want to removepublic java.util.Vector getHeaders(java.lang.String type)
public void copyHeader(GeneralHeader to)
to - the GeneralHeader to add headers to.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||