readPrefix abstract method

Future<Uint8List> readPrefix(
  1. String url,
  2. int length
)

The first length bytes of what url serves — fewer when it is shorter — read from the start of the response, the rest cancelled: the container header of a bundle of hundreds of MB costs a few KB. Throws when the URL cannot be read.

Implementation

Future<Uint8List> readPrefix(String url, int length);