A representation of a byte range as specified by RFC 7233.
This class parses the value of the Range request header value,
for example:
Range: bytes=100-499
Range: bytes=1-10,5-25,50-,-20
| Modifier and Type | Field and Description |
|---|---|
| private final long | |
| private final long | |
| private static final Logger |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private ByteRange | |
| public final boolean | equals(Object
the reference object with which to compare. o)Implements abstract java. Indicates whether some other object is "equal to" this one. |
| public long | |
| public long | |
| public final int | |
| public long | |
| private boolean | |
| public static List | |
| public String | Returns: the value for theContent-Range response header for this byte rangethe content length length)Returns the value for the |
| public static String | Returns: the non satisfiable value for theContent-Range response headerthe content length in bytes length)Returns the value for the |
| public final String | toString()
Implements abstract java. Returns a string representation of the record. |
| first | back to summary |
|---|---|
| private final long first Record Component accessed by first(). | |
| last | back to summary |
|---|---|
| private final long last Record Component accessed by last(). | |
| LOG | back to summary |
|---|---|
| private static final Logger LOG | |
| ByteRange | back to summary |
|---|---|
| public ByteRange(long first, long last) | |
| coalesce | back to summary |
|---|---|
| private ByteRange coalesce(ByteRange r) | |
| equals | back to summary |
|---|---|
| public final boolean equals(Object o) Implements abstract java. Doc from java. Indicates whether some other object is "equal to" this one. In addition
to the general contract of
R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
| |
| first | back to summary |
|---|---|
| public long first() Record Component getter of first. | |
| getLength | back to summary |
|---|---|
| public long getLength() Get the length of this byte range.
| |
| hashCode | back to summary |
|---|---|
| public final int hashCode() Implements abstract java. Doc from java. Returns a hash code value for the record.
Obeys the general contract of
| |
| last | back to summary |
|---|---|
| public long last() Record Component getter of last. | |
| overlaps | back to summary |
|---|---|
| private boolean overlaps(ByteRange range) | |
| parse | back to summary |
|---|---|
| public static List Parses the Returns an empty list if the parsing fails. | |
| toHeaderValue | back to summary |
|---|---|
| public String toHeaderValue(long length) Returns the value for the
| |
| toNonSatisfiableHeaderValue | back to summary |
|---|---|
| public static String toNonSatisfiableHeaderValue(long length) Returns the value for the
| |
| toString | back to summary |
|---|---|
| public final String toString() Implements abstract java. Doc from java. Returns a string representation of the record.
In accordance with the general contract of In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves.
| |