public class ByteRange
extends java.lang.Object
Modifier and Type | Class | Description |
---|---|---|
static class |
ByteRange.Range |
|
static class |
ByteRange.RangeResponseResult |
Constructor | Description |
---|---|
ByteRange(java.util.List<ByteRange.Range> ranges) |
Modifier and Type | Method | Description |
---|---|---|
long |
getEnd(int range) |
Gets the end of the specified range segment, or the number of bytes if this is a suffix range segment
|
int |
getRanges() |
|
ByteRange.RangeResponseResult |
getResponseResult(long resourceContentLength,
java.lang.String ifRange,
java.util.Date lastModified,
java.lang.String eTag) |
Returns a representation of the range result.
|
long |
getStart(int range) |
Gets the start of the specified range segment, of -1 if this is a suffix range segment
|
static ByteRange |
parse(java.lang.String rangeHeader) |
Attempts to parse a range request.
|
public ByteRange(java.util.List<ByteRange.Range> ranges)
public int getRanges()
public long getStart(int range)
range
- The range segment to getpublic long getEnd(int range)
range
- The range segment to getpublic static ByteRange parse(java.lang.String rangeHeader)
rangeHeader
- The range specpublic ByteRange.RangeResponseResult getResponseResult(long resourceContentLength, java.lang.String ifRange, java.util.Date lastModified, java.lang.String eTag)
resourceContentLength
- Copyright © 2018. All rights reserved.