blit_io library
Standardized async I/O API for blit.
Classes
- AsyncBufRead
- A buffered asynchronous byte source.
- AsyncFile
- Random-access async file with a stable, engine-independent API.
- AsyncRead
- Asynchronous byte source.
- AsyncWrite
- Asynchronous byte sink.
-
BufReader<
R extends AsyncRead> - Buffered reader with an internal byte buffer.
-
BufWriter<
W extends AsyncWrite> - Buffered writer; flushes when its buffer fills.
- Bytes
-
Immutable view over
[offset, offset + length)of aUint8List. - BytesAsyncReader
- Sequential reader over an immutable Bytes view.
- BytesLike
- BytesMut
- BytesMutAsyncWriter
- Growable writer backed by BytesMut.
- BytesReader
- BytesWriter
- CancelToken
- FileOptions
- IoSlice
- A byte range for async writes.
- ReadBuf
- A mutable read target with a filled/capacity split.
- ReadRequest
- One read request for AsyncFile.readMany.
- ReadResult
- Result of one async read.
- Uint64
- Exact unsigned 64-bit value.
- Uint8ListReader
-
Sequential reader over a fixed
Uint8List. - Uint8ListWriter
-
Fixed-capacity writer over a caller-owned
Uint8List. - WriteRequest
- One write request for AsyncFile.writeMany.
Extensions
- AsyncReadExt on AsyncRead
- Read-side utility methods.
- AsyncWriteExt on AsyncWrite
- Write-side utility methods.
- BytesLikeBytes on BytesLike
- Converts a BytesLike implementation to a zero-copy Bytes view.
- TypedDataBytes on TypedData
- Converts any TypedData to a zero-copy Bytes view.
Functions
-
copy(
AsyncRead src, AsyncWrite dst, {int bufferSize = 64 * 1024, int? limit}) → Future< int> - Top-level copy helper.
-
readerStream(
AsyncRead reader, {int bufferSize = 64 * 1024}) → Stream< Uint8List> - Turns an AsyncRead into a chunked stream.
-
readLine(
AsyncBufRead reader) → Future< String?> -
Reads a UTF-8 line from a buffered source, sans trailing
\n/\r\n.
Exceptions / Errors
- BlitException
- BlitIOException
- CancelledException
- ClosedException
- EndOfFileException
- LimitExceeded
- A read-to-end limit was exceeded.
- PermissionException
- QuotaExceededException
- UnexpectedEof
- End of stream before an exact read completed.
- UnsupportedException