Modifier and Type | Field and Description |
---|---|
private long |
firstPos |
private java.lang.Long |
lastPos |
Constructor and Description |
---|
ByteRange(long firstPos,
java.lang.Long lastPos) |
Modifier and Type | Method and Description |
---|---|
private void |
assertPositions(long firstBytePos,
java.lang.Long lastBytePos) |
boolean |
equals(java.lang.Object other) |
long |
getRangeEnd(long length)
Return the end of the range (inclusive) given the total length of a representation.
|
long |
getRangeStart(long length)
Return the start of the range given the total length of a representation.
|
int |
hashCode() |
java.lang.String |
toString() |
createByteRange, createByteRange, createSuffixRange, parseRanges, toResourceRegion, toResourceRegions, toString
private final long firstPos
@Nullable private final java.lang.Long lastPos
public ByteRange(long firstPos, @Nullable java.lang.Long lastPos)
private void assertPositions(long firstBytePos, @Nullable java.lang.Long lastBytePos)
public long getRangeStart(long length)
HttpRange
getRangeStart
in class HttpRange
length
- the length of the representationpublic long getRangeEnd(long length)
HttpRange
getRangeEnd
in class HttpRange
length
- the length of the representationpublic boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object