public final class RangedUri
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
long |
length
The length of the range, or
C.LENGTH_UNSET to indicate that the range is unbounded. |
long |
start
The (zero based) index of the first byte of the range.
|
| Constructor and Description |
|---|
RangedUri(java.lang.String referenceUri,
long start,
long length)
Constructs an ranged uri.
|
| Modifier and Type | Method and Description |
|---|---|
RangedUri |
attemptMerge(RangedUri other,
java.lang.String baseUri)
Attempts to merge this
RangedUri with another and an optional common base uri. |
boolean |
equals(java.lang.Object obj) |
int |
hashCode() |
android.net.Uri |
resolveUri(java.lang.String baseUri)
Returns the resolved
Uri represented by the instance. |
java.lang.String |
resolveUriString(java.lang.String baseUri)
Returns the resolved uri represented by the instance as a string.
|
public final long start
public final long length
C.LENGTH_UNSET to indicate that the range is unbounded.public RangedUri(java.lang.String referenceUri,
long start,
long length)
referenceUri - The reference uri.start - The (zero based) index of the first byte of the range.length - The length of the range, or C.LENGTH_UNSET to indicate that the range is
unbounded.public android.net.Uri resolveUri(java.lang.String baseUri)
Uri represented by the instance.baseUri - The base Uri.Uri represented by the instance.public java.lang.String resolveUriString(java.lang.String baseUri)
baseUri - The base Uri.public RangedUri attemptMerge(RangedUri other, java.lang.String baseUri)
RangedUri with another and an optional common base uri.
A merge is successful if both instances define the same Uri after resolution with the
base uri, and if one starts the byte after the other ends, forming a contiguous region with
no overlap.
If other is null then the merge is considered unsuccessful, and null is returned.
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object