public class RangesSpecifier
Range specifier for partial content requests (RFC 2616 sec 14.35.1)
Constructor and Description |
---|
RangesSpecifier(java.lang.String unit,
java.util.List<? extends io.ktor.http.ContentRange> ranges)
Range specifier for partial content requests (RFC 2616 sec 14.35.1)
|
RangesSpecifier(RangeUnits unit,
java.util.List<? extends io.ktor.http.ContentRange> ranges) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
component1()
range units,
|
java.util.List<io.ktor.http.ContentRange> |
component2()
a list of requested ranges
|
RangesSpecifier |
copy(java.lang.String unit,
java.util.List<? extends io.ktor.http.ContentRange> ranges)
Range specifier for partial content requests (RFC 2616 sec 14.35.1)
|
boolean |
equals(java.lang.Object p) |
java.util.List<io.ktor.http.ContentRange> |
getRanges()
a list of requested ranges
|
java.lang.String |
getUnit()
range units,
|
int |
hashCode() |
boolean |
isValid(kotlin.jvm.functions.Function1<? super java.lang.String,java.lang.Boolean> rangeUnitPredicate)
Verify ranges
|
java.util.List<kotlin.ranges.LongRange> |
merge(long length,
int maxRangeCount)
Resolve and merge all overlapping and neighbours ranges
|
java.util.List<kotlin.ranges.LongRange> |
merge(long length)
Merges all overlapping and neighbours ranges. Currently gaps collapse is not supported but should be, one day.
|
kotlin.ranges.LongRange |
mergeToSingle(long length)
Merge all ranges into a single absolute long range
|
java.lang.String |
toString() |
public RangesSpecifier(java.lang.String unit, java.util.List<? extends io.ktor.http.ContentRange> ranges)
Range specifier for partial content requests (RFC 2616 sec 14.35.1)
unit
- range units, usually bytesranges
- a list of requested ranges (could be open or closed ranges)public RangesSpecifier(RangeUnits unit, java.util.List<? extends io.ktor.http.ContentRange> ranges)
public boolean isValid(kotlin.jvm.functions.Function1<? super java.lang.String,java.lang.Boolean> rangeUnitPredicate)
Verify ranges
public java.util.List<kotlin.ranges.LongRange> merge(long length, int maxRangeCount)
Resolve and merge all overlapping and neighbours ranges
length
- content lengthpublic java.util.List<kotlin.ranges.LongRange> merge(long length)
Merges all overlapping and neighbours ranges. Currently gaps collapse is not supported but should be, one day.
public kotlin.ranges.LongRange mergeToSingle(long length)
Merge all ranges into a single absolute long range
length
- content lengthpublic java.lang.String toString()
public java.lang.String getUnit()
range units,
usually bytes
public java.util.List<io.ktor.http.ContentRange> getRanges()
a list of requested ranges
(could be open or closed ranges)
public java.lang.String component1()
range units,
usually bytes
public java.util.List<io.ktor.http.ContentRange> component2()
a list of requested ranges
(could be open or closed ranges)
public RangesSpecifier copy(java.lang.String unit, java.util.List<? extends io.ktor.http.ContentRange> ranges)
Range specifier for partial content requests (RFC 2616 sec 14.35.1)
public int hashCode()
public boolean equals(java.lang.Object p)