Library io

To use this library in your code:

import io
The Toit IO library.
This library provides classes and functions for manipulating binary data.
Use Reader and Writer to read and write binary data, and Buffer to accumulate data.

Exported interfaces

A producer of bytes.

Exported classes

Support for big endian byte order.

A buffer that can be used to build byte data.

A byte order class with support for common read and write operations on byte arrays.

Support for little endian byte order.

A source of bytes.

A consumer of bytes.

Exported globals

A constant BigEndian singleton.

A constant LittleEndian singleton.

Exported functions

Returns the standard error stream.
Writes go directly to the platform's standard error and do not pass through the print service. A write is synchronous and may block in the underlying platform operation. The stream cannot be closed.
On host platforms, use host.stderr when closing the stream or querying whether it is a terminal is required.

Returns the standard input stream.
On ESP32, input is supported when ESP-IDF's primary console is a UART or USB Serial/JTAG. Other console backends are unsupported.
The stream cannot be closed. It shares the platform input with other standard input APIs. If multiple readers or containers read concurrently, the first reader to consume available data receives it.
On host platforms, use host.stdin when closing the stream or querying whether it is a terminal is required.

Returns the standard output stream.
Writes go directly to the platform's standard output and do not pass through the print service. A write is synchronous and may block in the underlying platform operation. The stream cannot be closed.
On host platforms, use host.stdout when closing the stream or querying whether it is a terminal is required.