Class HttpHeaderParser

java.lang.Object
org.sblim.cimclient.internal.http.HttpHeaderParser

public class HttpHeaderParser extends Object
Class HttpHeaderParser parses http headers
  • Constructor Details

    • HttpHeaderParser

      public HttpHeaderParser(String pHeader)
      Ctor.
      Parameters:
      pHeader - The header block
  • Method Details

    • getField

      public String getField(int pIndex)
      Returns the header field at a given index
      Parameters:
      pIndex - The index
      Returns:
      The field name
    • 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
    • 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
    • toString

      public String toString()
      Overrides:
      toString in class Object