Class ContentRange

All Implemented Interfaces:
HttpHeader

public class ContentRange extends HttpStringHeader
Represents an HTTP Content-Range header.

Where in a full body message this partial message belongs.

See Also:
Since:
9.2.1
  • Field Details

  • Constructor Details

    • ContentRange

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

      public ContentRange(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 ContentRange 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 ContentRange 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 ContentRange.Builder create()
      Creates a new ContentRange.Builder defaulting to the bytes range unit.
      Returns:
      A new builder. Never null.