DataSource class abstract interface

Random-access byte source — any file, any backing store.

The engine reads arbitrary offsets on demand (xref at end of file, objects scattered throughout). This is NOT a forward-only stream — the engine seeks backward and forward. A one-shot socket or pipe that can only read sequentially cannot be a DataSource. Buffer the full content first, or use a backing store with random access.

Memory is O(1) per read (64KB max per call). The full file is never buffered by the engine — only the backing store holds it.

Implement with your backing store: file (pread), memory (sublistView), HTTP (Range header), IndexedDB, web Blob.slice.

Implementers

Properties

hashCode int
The hash code for this object.
no setterinherited
length int
Total size in bytes.
no setter
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
readAt(int offset, int count) FutureOr<Uint8List>
Read count bytes starting at offset.
toString() String
A string representation of this object.
inherited

Operators

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