FourdgsReadable class abstract

The one abstraction the decoder depends on.

A reader needs exactly two things from a resource: how big it is, and the bytes in a range. Everything else — a file, an HTTP server, a cache, an in-memory buffer — is a transport, and transports live at the edges so the decoder can be tested without a network and shipped without a platform.

size is asynchronous because some transports only learn it from their first response (an HTTP reader reads it off Content-Range), and pretending otherwise would push a blocking probe into every implementation.

Implementers

Constructors

FourdgsReadable()

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
read(int offset, int length) → Future<Uint8List>
Exactly length bytes at offset, or a thrown error.
size() → Future<int>
Total size of the resource in bytes.
toString() → String
A string representation of this object.
inherited

Operators

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