ByteRange class final

A part of a file to fetch: an HTTP Range of bytes, so a tool can read a zip's directory, or one file in it, without downloading all of it.

Constructors

ByteRange(int start, int end)
Bytes start to end, both included.
ByteRange.suffix(int length)
The last length bytes of the file (all of it, when it is shorter).

Properties

hashCode → int
The hash code for this object.
no setterinherited
The Range header asking for it.
no setter
length → int
How many bytes it asks for, at most.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

answeredBy(String? contentRange) → ({int end, int start, int total})?
What a Content-Range header (contentRange) says was sent, when it is exactly this part of the file — clipped to the file's end, as a server does; null when it is anything else.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

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