public final class RangedUri
extends java.lang.Object
Uri
.Modifier and Type | Field and Description |
---|---|
long |
length
The length of the range, or -1 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 baseUri,
java.lang.String referenceUri,
long start,
long length)
Constructs an ranged uri.
|
Modifier and Type | Method and Description |
---|---|
RangedUri |
attemptMerge(RangedUri other)
Attempts to merge this
RangedUri with another. |
boolean |
equals(java.lang.Object obj) |
android.net.Uri |
getUri()
Returns the
Uri represented by the instance. |
java.lang.String |
getUriString()
Returns the uri represented by the instance as a string.
|
int |
hashCode() |
public final long start
public final long length
public RangedUri(java.lang.String baseUri, java.lang.String referenceUri, long start, long length)
baseUri
- A uri that can form the base of the uri defined by the instance.referenceUri
- A reference uri that should be resolved with respect to baseUri
.start
- The (zero based) index of the first byte of the range.length
- The length of the range, or -1 to indicate that the range is unbounded.public android.net.Uri getUri()
Uri
represented by the instance.Uri
represented by the instance.public java.lang.String getUriString()
public RangedUri attemptMerge(RangedUri other)
RangedUri
with another.
A merge is successful if both instances define the same Uri
, and if one starte 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.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object