random_access_source 1.2.0 copy "random_access_source: ^1.2.0" to clipboard
random_access_source: ^1.2.0 copied to clipboard

Shared interfaces for random access data.

random_access_source #

pub package Build Status

Shared interfaces for random access data

Usage #

This library defines a common interface for random access data.

/// Base class for random access sources.
abstract class RandomAccessSource {
  /// Gets the length of the source.
  Future<int> length();

  /// Reads a byte from the source.
  Future<int> readByte();

  /// Reads an array of bytes from the source.
  Future<Uint8List> read(int length);

  /// Gets the current position in the source.
  Future<int> position();

  /// Sets the current position in the source.
  Future<void> setPosition(int position);

  /// Closes the source.
  Future<void> close();
}

Implementations:

  • BytesRASource for Uint8List data
  • RandomAccessFileRASource for RandomAccessFile data
0
likes
150
points
343
downloads

Publisher

verified publisherflutter-cavalry.com

Weekly Downloads

Shared interfaces for random access data.

Repository (GitHub)

Documentation

API reference

License

BSD-3-Clause (license)

More

Packages that depend on random_access_source