Class Range

All Implemented Interfaces:
HttpHeader

public class Range extends HttpStringHeader
Represents an HTTP Range header.

Request only part of an entity. Bytes are numbered from 0.

See Also:
Since:
9.2.1
  • Field Details

  • Constructor Details

    • Range

      public Range(String value)
      Constructor with an eager value.
      Parameters:
      value - The header value. May be null.
    • Range

      public Range(Supplier<String> valueSupplier)
      Constructor with a lazy value supplier.
      Parameters:
      valueSupplier - Supplier for the header value. Must not be null.
  • Method Details

    • of

      public static Range of(String value)
      Static factory method with an eager value.
      Parameters:
      value - The header value. May be null.
      Returns:
      A new instance. Never null.
    • of

      public static Range of(Supplier<String> valueSupplier)
      Static factory method with a lazy value supplier.
      Parameters:
      valueSupplier - Supplier for the header value. Must not be null.
      Returns:
      A new instance. Never null.
    • create

      public static Range.Builder create()
      Creates a new Range.Builder defaulting to the bytes range unit.
      Returns:
      A new builder. Never null.