Class HttpHeaderParser
- java.lang.Object
-
- org.sblim.cimclient.internal.http.HttpHeaderParser
-
public class HttpHeaderParser extends java.lang.Object
Class HttpHeaderParser parses http headers
-
-
Constructor Summary
Constructors Constructor Description HttpHeaderParser(java.lang.String pHeader)
Ctor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getField(int pIndex)
Returns the header field at a given indexint
getIntValue(java.lang.String pName, int pDefault)
Returns the value of a numeric header field for a given name specifying a default.java.lang.String
getValue(int pIndex)
Returns the value of a header field at a given indexjava.lang.String
getValue(java.lang.String pName)
Returns the value of a header field for a given namejava.lang.String
getValue(java.lang.String pName, java.lang.String pDefault)
Returns the value of a header field for a given name specifying a default.java.lang.String
toString()
-
-
-
Method Detail
-
getField
public java.lang.String getField(int pIndex)
Returns the header field at a given index- Parameters:
pIndex
- The index- Returns:
- The field name
-
getValue
public java.lang.String getValue(int pIndex)
Returns the value of a header field at a given index- Parameters:
pIndex
-- Returns:
- The value
-
getValue
public java.lang.String getValue(java.lang.String pName)
Returns the value of a header field for a given name- Parameters:
pName
- The name- Returns:
- The value
-
getValue
public java.lang.String getValue(java.lang.String pName, java.lang.String pDefault)
Returns the value of a header field for a given name specifying a default.- Parameters:
pName
- The name of the header fieldpDefault
- The value returned if no field of the given name exists- Returns:
- The value
-
getIntValue
public int getIntValue(java.lang.String pName, int pDefault)
Returns the value of a numeric header field for a given name specifying a default.- Parameters:
pName
- The name of the header fieldpDefault
- The value returned if no field of the given name exists- Returns:
- The value
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-