Class ContentRange.Builder

java.lang.Object
org.apache.juneau.http.header.ContentRange.Builder
Enclosing class:
ContentRange

public static class ContentRange.Builder extends Object
Fluent builder for assembling an HTTP Content-Range header value.

Composes the three fields defined by RFC 7233 §4.2 — the range unit (default bytes), the resolved first-last byte range (or * for an unsatisfied range), and the complete-length (or * when unknown) — into forms such as bytes 0-1023/2048, bytes 0-1023/*, and bytes */2048.

Example:

String value = ContentRange.create() .range(0, 1023) .length(2048) .build(); // => "bytes 0-1023/2048"

See Also:
Since:
10.0.0
  • Constructor Details

  • Method Details