Class HPackHeader

java.lang.Object
org.apache.hc.core5.http2.hpack.HPackHeader
All Implemented Interfaces:
Header, NameValuePair

final class HPackHeader extends Object implements Header
Internal HPack header representation that also contains binary length of header name and header value.
  • Field Details

    • ENTRY_SIZE_OVERHEAD

      private static final int ENTRY_SIZE_OVERHEAD
      See Also:
    • name

      private final String name
    • nameLen

      private final int nameLen
    • value

      private final String value
    • valueLen

      private final int valueLen
    • sensitive

      private final boolean sensitive
  • Constructor Details

    • HPackHeader

      HPackHeader(String name, int nameLen, String value, int valueLen, boolean sensitive)
    • HPackHeader

      HPackHeader(String name, String value, boolean sensitive)
    • HPackHeader

      HPackHeader(String name, String value)
    • HPackHeader

      HPackHeader(Header header)
  • Method Details

    • getName

      public String getName()
      Description copied from interface: NameValuePair
      Gets the name of this pair.
      Specified by:
      getName in interface NameValuePair
      Returns:
      the name of this pair, never null.
    • getNameLen

      public int getNameLen()
    • getValue

      public String getValue()
      Description copied from interface: NameValuePair
      Gets the value of this pair.
      Specified by:
      getValue in interface NameValuePair
      Returns:
      the value of this pair, may be null.
    • getValueLen

      public int getValueLen()
    • isSensitive

      public boolean isSensitive()
      Description copied from interface: Header
      Returns true if the header should be considered sensitive.

      Some encoding schemes such as HPACK impose restrictions on encoded representation of sensitive headers.

      Specified by:
      isSensitive in interface Header
      Returns:
      true if the header should be considered sensitive.
    • getTotalSize

      public int getTotalSize()
    • toString

      public String toString()
      Overrides:
      toString in class Object