Class IfRange

java.lang.Object
org.apache.juneau.http.header.HttpHeaderBean
org.apache.juneau.http.header.IfRange
All Implemented Interfaces:
HttpHeader

public class IfRange extends HttpHeaderBean
Represents an HTTP If-Range header.

If the entity is unchanged, send me the part(s) that I am missing; otherwise, send me the entire new entity.

See Also:
Since:
9.2.1
  • Field Details

  • Constructor Details

    • IfRange

      public IfRange(EntityTag value)
      Constructor with an entity-tag value.
      Parameters:
      value - The entity tag. May be null.
    • IfRange

      public IfRange(String value)
      Constructor with a wire string (HTTP-date or entity-tag).
      Parameters:
      value - The header value. May be null.
    • IfRange

      public IfRange(Supplier<?> valueSupplier)
      Constructor with a lazy supplier of EntityTag or ZonedDateTime.
      Parameters:
      valueSupplier - Supplier for the value. Must not be null.
    • IfRange

      public IfRange(ZonedDateTime value)
      Constructor with an HTTP-date.
      Parameters:
      value - The date/time. May be null.
  • Method Details

    • asEntityTag

      Returns:
      This header as an EntityTag.
    • asZonedDateTime

      Returns:
      This header as a ZonedDateTime when the value is an HTTP-date.
    • getValue

      public String getValue()
      Description copied from interface: HttpHeader
      Returns the header value, or null if the header has no value.
      Specified by:
      getValue in interface HttpHeader
      Overrides:
      getValue in class HttpHeaderBean
      Returns:
      The header value, possibly null.
    • of

      public static IfRange of(EntityTag value)
      Static factory with an entity-tag.
      Parameters:
      value - The tag. May be null, in which case null is returned.
      Returns:
      A new instance, or null if value is null.
    • of

      public static IfRange of(String value)
      Static factory with a wire string.
      Parameters:
      value - The value. May be null, in which case null is returned.
      Returns:
      A new instance, or null if value is null.
    • of

      public static IfRange of(Supplier<?> valueSupplier)
      Static factory with a lazy supplier.
      Parameters:
      valueSupplier - Supplier of EntityTag or ZonedDateTime. Must not be null.
      Returns:
      A new instance. Never null.
    • of

      public static IfRange of(ZonedDateTime value)
      Static factory with an HTTP-date.
      Parameters:
      value - The date/time. May be null, in which case null is returned.
      Returns:
      A new instance, or null if value is null.