ByteRange class

Inclusive-exclusive byte range [start, end) backed by BigInt.

Constructors

ByteRange(BigInt start, BigInt end)
Creates a byte range [start, end). Both bounds must be non-negative and end must be greater than or equal to start.

Properties

end → BigInt
End offset (exclusive).
final
hashCode → int
The hash code for this object.
no setterinherited
length → BigInt
Length of the range in bytes.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
start → BigInt
Start offset (inclusive).
final

Methods

intersection(ByteRange other) → ByteRange?
Returns the intersection between this range and other, or null when disjoint.
intersects(ByteRange other) → bool
Returns true if this range intersects with other.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
subtract(ByteRange other) → List<ByteRange>
Subtract other from this range, returning up to two residual ranges.
toString() → String
A string representation of this object.
inherited
union(ByteRange other) → ByteRange
Minimal union covering this and other. Adjacent or overlapping ranges are merged; disjoint non-adjacent ranges return the covering span.

Operators

operator ==(Object other) → bool
The equality operator.
inherited