public class RangeRequest extends Object implements Comparable<RangeRequest>
Modifier and Type | Field and Description |
---|---|
static Pattern |
RANGE_PATTERN |
Constructor and Description |
---|
RangeRequest(long firstByte,
long contentLength) |
RangeRequest(long firstByte,
long lastByte,
long contentLength) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(RangeRequest that) |
long |
getContentLength() |
long |
getEnd() |
long |
getOffset() |
long |
getRangeLength() |
static RangeRequest |
parse(String headerValue,
long contentLength)
Parse a range header value into a RangeRequest
|
public static final Pattern RANGE_PATTERN
public RangeRequest(long firstByte, long contentLength)
public RangeRequest(long firstByte, long lastByte, long contentLength)
public long getOffset()
public long getEnd()
public long getRangeLength()
public long getContentLength()
public static RangeRequest parse(String headerValue, long contentLength) throws RangeNotSatisfiableException
headerValue
- the string value of the headerUnsupportedOperationException
- if the header value cannot be parsedRangeNotSatisfiableException
- if the header value cannot be parsedpublic int compareTo(RangeRequest that)
compareTo
in interface Comparable<RangeRequest>
Copyright © 2003–2019 Atlassian. All rights reserved.