Interface Http.HeaderValue

All Known Subinterfaces:
Http.HeaderValueWriteable
All Known Implementing Classes:
ContentDisposition
Enclosing class:
Http

public static interface Http.HeaderValue
HTTP Header with Http.HeaderName and value.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    All values of this header.
    default List<String>
    allValues(boolean split)
    All values of this header.
    boolean
    Changing headers should not be cached, and their value should not be indexed (HTTP/2).
    Header name for the header.
    Name of the header as configured by user or as received on the wire.
    boolean
    Sensitive headers should not be logged, or indexed (HTTP/2).
    First value of this header.
    <T> T
    value(Class<T> type)
    Value mapped using a MapperManager.
    default byte[]
    Cached bytes of a single valued header's value.
    int
    Number of values this header has.
    default String
    All values concatenated using a comma.
    default void
    Write the current header as an HTTP header to the provided buffer.
  • Method Details

    • name

      String name()
      Name of the header as configured by user or as received on the wire.
      Returns:
      header name, always lower case for HTTP/2 headers
    • headerName

      Http.HeaderName headerName()
      Header name for the header.
      Returns:
      header name
    • value

      String value()
      First value of this header.
      Returns:
      the first value
    • value

      <T> T value(Class<T> type)
      Value mapped using a MapperManager.
      Type Parameters:
      T - type of the value
      Parameters:
      type - class of the value
      Returns:
      typed value
    • values

      default String values()
      All values concatenated using a comma.
      Returns:
      all values joined by a comma
    • allValues

      List<String> allValues()
      All values of this header.
      Returns:
      all configured values
    • allValues

      default List<String> allValues(boolean split)
      All values of this header. If this header is defined as a single header with comma separated values, set split to true.
      Parameters:
      split - whether to split single value by comma, does nothing if the value is already a list.
      Returns:
      list of values
    • valueCount

      int valueCount()
      Number of values this header has.
      Returns:
      number of values (minimal number is 1)
    • sensitive

      boolean sensitive()
      Sensitive headers should not be logged, or indexed (HTTP/2).
      Returns:
      whether this header is sensitive
    • changing

      boolean changing()
      Changing headers should not be cached, and their value should not be indexed (HTTP/2).
      Returns:
      whether this header's value is changing often
    • valueBytes

      default byte[] valueBytes()
      Cached bytes of a single valued header's value.
      Returns:
      value bytes
    • writeHttp1Header

      default void writeHttp1Header(BufferData buffer)
      Write the current header as an HTTP header to the provided buffer.
      Parameters:
      buffer - buffer to write to (should be growing)