|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ikrs.util.KeyValuePair<java.lang.String,java.lang.String> ikrs.util.KeyValueStringPair ikrs.httpd.HTTPHeaderLine
public final class HTTPHeaderLine
The HTTPHeaderLine class is very simple datastructure to hold single HTTP header lines (each line represents a key/value pair). It can also be used to parse one header line after the other. Note: instances of this class are and have to be immutable!
Constructor Summary | |
---|---|
HTTPHeaderLine(java.lang.String key,
java.lang.String value)
This is a private constructor and not meant to be public. |
Method Summary | |
---|---|
int |
compareTo(HTTPHeaderLine element)
This method implements Comparable.compareTo(...). |
boolean |
equals(HTTPHeaderLine element)
This method returns true if (and only if) this and 'element' are equal. |
boolean |
equals(java.lang.Object element)
This method returns true if (and only if) this and the passed element are equal. |
byte[] |
getRawBytes(java.nio.charset.Charset charset)
Get the raw byte data for this header line. |
boolean |
isResponseStatus()
Get the value of this header line. |
static HTTPHeaderLine |
parse(java.lang.String line)
This method parses header lines. |
static HTTPHeaderLine |
read(java.io.InputStream in)
Read the next header line from the input stream. |
java.lang.String |
toString()
Converts this key-value-pair into a human readable form. |
Methods inherited from class ikrs.util.KeyValueStringPair |
---|
main, split, split, split |
Methods inherited from class ikrs.util.KeyValuePair |
---|
getKey, getValue, splitLine |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public HTTPHeaderLine(java.lang.String key, java.lang.String value)
Method Detail |
---|
public boolean isResponseStatus()
public int compareTo(HTTPHeaderLine element)
compareTo
in interface java.lang.Comparable<HTTPHeaderLine>
element
- The HTTPHeaderLine to compare with.public byte[] getRawBytes(java.nio.charset.Charset charset)
public boolean equals(HTTPHeaderLine element)
public boolean equals(java.lang.Object element)
equals
in class java.lang.Object
public static HTTPHeaderLine read(java.io.InputStream in) throws java.io.EOFException, java.io.IOException
in
- The InputStream to read from.
java.io.EOFException
java.io.IOException
public static HTTPHeaderLine parse(java.lang.String line)
line
- The header line from the HTTP headers.
public java.lang.String toString()
KeyValuePair
toString
in class KeyValuePair<java.lang.String,java.lang.String>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |