org.sblim.cimclient.internal.http

Class HttpHeaderParser

public class HttpHeaderParser extends Object

Class HttpHeaderParser parses http headers
Constructor Summary
HttpHeaderParser(String pHeader)
Ctor.
Method Summary
StringgetField(int pIndex)
Returns the header field at a given index
intgetIntValue(String pName, int pDefault)
Returns the value of a numeric header field for a given name specifying a default.
StringgetValue(int pIndex)
Returns the value of a header field at a given index
StringgetValue(String pName)
Returns the value of a header field for a given name
StringgetValue(String pName, String pDefault)
Returns the value of a header field for a given name specifying a default.

Constructor Detail

HttpHeaderParser

public HttpHeaderParser(String pHeader)
Ctor.

Parameters: pHeader The header block

Method Detail

getField

public String getField(int pIndex)
Returns the header field at a given index

Parameters: pIndex The index

Returns: The field name

getIntValue

public int getIntValue(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 field pDefault The value returned if no field of the given name exists

Returns: The value

getValue

public String getValue(int pIndex)
Returns the value of a header field at a given index

Parameters: pIndex

Returns: The value

getValue

public String getValue(String pName)
Returns the value of a header field for a given name

Parameters: pName The name

Returns: The value

getValue

public String getValue(String pName, String pDefault)
Returns the value of a header field for a given name specifying a default.

Parameters: pName The name of the header field pDefault The value returned if no field of the given name exists

Returns: The value

Copyright © 2005, 2009 IBM Corporation. All Rights Reserved.