Class Headers.Entry

  • Enclosing class:
    Headers

    public static class Headers.Entry
    extends java.lang.Object
    A header entry.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Headers.Entry.Type  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getInt()
      Return an integer value if the type is INT, otherwise 0
      long getLong()
      Return a long value if the type is LONG, otherwise -1
      java.lang.String getName()
      Return the header name.
      java.lang.String getString()
      Return the string representation of this entry's value.
      Headers.Entry.Type getType()
      Return the header type.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Method Detail

      • getString

        public java.lang.String getString()
        Return the string representation of this entry's value. If the value's type is not STRING, it is converted to a string as follows:
        • a long is formatted as a date in RFC1123 format
        • an integer is formatted as decimal number
        Returns:
        string representation
      • getLong

        public long getLong()
        Return a long value if the type is LONG, otherwise -1
        Returns:
        long
      • getInt

        public int getInt()
        Return an integer value if the type is INT, otherwise 0
        Returns:
        integer
      • getName

        public java.lang.String getName()
        Return the header name.
        Returns:
        name
      • toString

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