RangedUri
@UnstableApi
class RangedUri
Defines a range of data located at a reference uri.
Summary
Public constructors |
|---|
|
Constructs an ranged uri. |
Public functions |
|
|---|---|
RangedUri? |
attemptMerge(other: RangedUri?, baseUri: String!)Attempts to merge this |
Boolean |
|
Int |
hashCode() |
Uri! |
resolveUri(baseUri: String!)Returns the resolved |
String! |
resolveUriString(baseUri: String!)Returns the resolved uri represented by the instance as a string. |
String! |
toString() |
Public properties |
|
|---|---|
Long |
The length of the range, or |
Long |
The (zero based) index of the first byte of the range. |
Public constructors
RangedUri
RangedUri(referenceUri: String?, start: Long, length: Long)
Constructs an ranged uri.
| Parameters | |
|---|---|
referenceUri: String? |
The reference uri. |
start: Long |
The (zero based) index of the first byte of the range. |
length: Long |
The length of the range, or |
Public functions
attemptMerge
fun attemptMerge(other: RangedUri?, baseUri: String!): RangedUri?
Attempts to merge this 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.
resolveUri
fun resolveUri(baseUri: String!): Uri!
Returns the resolved Uri represented by the instance.
| Parameters | |
|---|---|
baseUri: String! |
The base Uri. |
resolveUriString
fun resolveUriString(baseUri: String!): String!
Returns the resolved uri represented by the instance as a string.
| Parameters | |
|---|---|
baseUri: String! |
The base Uri. |
| Returns | |
|---|---|
String! |
The uri represented by the instance. |
Public properties
length
val length: Long
The length of the range, or LENGTH_UNSET to indicate that the range is unbounded.