RawSource
Supplies a stream of bytes. RawSource is a base interface for kotlinx-io
data suppliers.
The interface should be implemented to read data from wherever it's located: from the network, storage, or a buffer in memory. Sources may be layered to transform supplied data, such as to decompress, decrypt, or remove protocol framing.
Most applications shouldn't operate on a raw source directly, but rather on a buffered Source which is both more efficient and more convenient. Use buffered to wrap any raw source with a buffer.
Implementors should abstain from throwing exceptions other than those that are documented for RawSource methods.
Thread-safety guarantees
RawSource implementations are not required to be thread safe. However, if an implementation provides some thread safety guarantees, it is recommended to explicitly document them.