"Range" header.
HttpHeaders#setRange(List), HttpHeaders#getRange()
| Modifier and Type | Class and Description |
|---|---|
| private static class | HttpRange.ByteRange
Represents an HTTP/1.1 byte range, with a first and optional last position. |
| private static class | HttpRange.SuffixByteRange
Represents an HTTP/1.1 suffix byte range, with a number of suffix bytes. |
| Modifier and Type | Field and Description |
|---|---|
| private static final String | |
| private static final int | MAX_RANGES
Maximum ranges per request. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static HttpRange | Returns: a byte range that ranges fromfirstPos till the endthe first byte position firstBytePos)Create an |
| public static HttpRange | Returns: a byte range that ranges fromfirstPos till lastPosthe first byte position firstBytePos, long the last byte position lastBytePos)Create a |
| public static HttpRange | Returns: a byte range that ranges over the lastsuffixLength number of bytesthe number of bytes for the range suffixLength)Create an |
| private static long | |
| public abstract long | Returns: the end of the range for the representationthe length of the representation length)Return the end of the range (inclusive) given the total length of a representation. |
| public abstract long | Returns: the start of this range for the representationthe length of the representation length)Return the start of the range given the total length of a representation. |
| private static HttpRange | |
| public static List | Returns: the list of rangesthe string to parse ranges)Parse the given, comma-separated string into a list of |
| public ResourceRegion | Returns: the selected region of the givenResourcethe resource)Resource to select the region fromTurn a |
| public static List | Returns: the list of regions for the given resourcethe list of ranges ranges, Resource the resource to select the regions from resource)Convert each |
| public static String | Returns: the string representationthe ranges to create a string of ranges)Return a string representation of the given list of |
| BYTE_RANGE_PREFIX | back to summary |
|---|---|
| private static final String BYTE_RANGE_PREFIX | |
| MAX_RANGES | back to summary |
|---|---|
| private static final int MAX_RANGES Maximum ranges per request. | |
| HttpRange | back to summary |
|---|---|
| public HttpRange() | |
| createByteRange | back to summary |
|---|---|
| public static HttpRange createByteRange(long firstBytePos) Create an
| |
| createByteRange | back to summary |
|---|---|
| public static HttpRange createByteRange(long firstBytePos, long lastBytePos) Create a
| |
| createSuffixRange | back to summary |
|---|---|
| public static HttpRange createSuffixRange(long suffixLength) Create an
| |
| getLengthFor | back to summary |
|---|---|
| private static long getLengthFor(Resource resource) | |
| getRangeEnd | back to summary |
|---|---|
| public abstract long getRangeEnd(long length) Return the end of the range (inclusive) given the total length of a representation.
| |
| getRangeStart | back to summary |
|---|---|
| public abstract long getRangeStart(long length) Return the start of the range given the total length of a representation.
| |
| parseRange | back to summary |
|---|---|
| private static HttpRange parseRange(String range) | |
| parseRanges | back to summary |
|---|---|
| public static List Parse the given, comma-separated string into a list of This method can be used to parse an
| |
| toResourceRegion | back to summary |
|---|---|
| public ResourceRegion toResourceRegion(Resource resource) Turn a
| |
| toResourceRegions | back to summary |
|---|---|
| public static List Convert each
| |
| toString | back to summary |
|---|---|
| public static String toString(Collection<HttpRange> ranges) Return a string representation of the given list of This method can be used to for an
| |
| Modifier and Type | Field and Description |
|---|---|
| private final long | |
| private final Long |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public boolean | equals(Object
the reference object with which to compare. other)Overrides java. |
| public long | getRangeEnd(long
the length of the representation length)Implements abstract org. |
| public long | getRangeStart(long
the length of the representation length)Implements abstract org. |
| public int | |
| public String |
| firstPos | back to summary |
|---|---|
| private final long firstPos | |
| lastPos | back to summary |
|---|---|
| private final Long lastPos
| |
| ByteRange | back to summary |
|---|---|
| public ByteRange(long firstPos, Long lastPos) | |
| assertPositions | back to summary |
|---|---|
| private void assertPositions(long firstBytePos, Long lastBytePos) | |
| equals | back to summary |
|---|---|
| public boolean equals(Object other) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getRangeEnd | back to summary |
|---|---|
| public long getRangeEnd(long length) Implements abstract org. Doc from org. Return the end of the range (inclusive) given the total length of a representation.
| |
| getRangeStart | back to summary |
|---|---|
| public long getRangeStart(long length) Implements abstract org. Doc from org. Return the start of the range given the total length of a representation.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
HttpRange#createSuffixRange(long)
| Modifier and Type | Field and Description |
|---|---|
| private final long |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object
the reference object with which to compare. other)Overrides java. |
| public long | getRangeEnd(long
the length of the representation length)Implements abstract org. |
| public long | getRangeStart(long
the length of the representation length)Implements abstract org. |
| public int | |
| public String |
| suffixLength | back to summary |
|---|---|
| private final long suffixLength | |
| SuffixByteRange | back to summary |
|---|---|
| public SuffixByteRange(long suffixLength) | |
| equals | back to summary |
|---|---|
| public boolean equals(Object other) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getRangeEnd | back to summary |
|---|---|
| public long getRangeEnd(long length) Implements abstract org. Doc from org. Return the end of the range (inclusive) given the total length of a representation.
| |
| getRangeStart | back to summary |
|---|---|
| public long getRangeStart(long length) Implements abstract org. Doc from org. Return the start of the range given the total length of a representation.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |