|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.sblim.cimclient.internal.http.HttpHeader
public class HttpHeader
Class HttpHeader represents a http header block
Nested Class Summary | |
---|---|
static class |
HttpHeader.HeaderEntry
Class HeaderEntry represents a single header field |
Constructor Summary | |
---|---|
HttpHeader()
Ctor. |
|
HttpHeader(InputStream pReader)
Ctor. |
Method Summary | |
---|---|
void |
addField(String pName,
String pValue)
Adds a header field |
void |
clear()
Clears all header fields |
static String |
encode(byte[] pData)
Encodes raw data |
static String |
encode(byte[] pData,
String pEnc)
Encodes raw data for a given character set |
static String |
encode(String pData,
String pSourceEnc,
String pTargetEnc)
Encodes a given string for a given character set |
void |
examineTrailer()
Throws a TrailerException if it contains recognized CIM errors in http trailer entries. |
String |
getField(String pName)
Returns a field from the header |
Iterator<Map.Entry<HttpHeader.HeaderEntry,String>> |
iterator()
Return an iterator over the header fields |
static HttpHeader |
parse(String pLine)
Parses a line from a header block |
void |
removeField(String pName)
Removes a field from the header |
String |
toString()
|
void |
write(ASCIIPrintStream pWriter)
Writes a header block to a stream |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public HttpHeader()
public HttpHeader(InputStream pReader) throws IOException
pReader
- The input stream
IOException
Method Detail |
---|
public void addField(String pName, String pValue)
pName
- The name of the header fieldpValue
- The valuepublic void clear()
public Iterator<Map.Entry<HttpHeader.HeaderEntry,String>> iterator()
public static HttpHeader parse(String pLine)
pLine
- The line
public String toString()
toString
in class Object
public void removeField(String pName)
pName
- The name of the fieldpublic String getField(String pName)
pName
- The name of the field
public void write(ASCIIPrintStream pWriter)
pWriter
- The streampublic static String encode(byte[] pData)
pData
- The raw data
public static String encode(byte[] pData, String pEnc) throws UnsupportedEncodingException
pData
- The raw datapEnc
- The character set
UnsupportedEncodingException
public static String encode(String pData, String pSourceEnc, String pTargetEnc) throws UnsupportedEncodingException
pData
- The source stringpSourceEnc
- The source character setpTargetEnc
- The target character set
UnsupportedEncodingException
public void examineTrailer() throws TrailerException
TrailerException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |