Class 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 index
      int 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 index
      java.lang.String getValue​(java.lang.String pName)
      Returns the value of a header field for a given name
      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.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • HttpHeaderParser

        public HttpHeaderParser​(java.lang.String pHeader)
        Ctor.
        Parameters:
        pHeader - The header block
    • 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 field
        pDefault - 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 field
        pDefault - The value returned if no field of the given name exists
        Returns:
        The value
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object