RawSink
Receives a stream of bytes. RawSink is a base interface for kotlinx-io
data receivers.
This interface should be implemented to write data wherever it's needed: to the network, storage, or a buffer in memory. Sinks may be layered to transform received data, such as to compress, encrypt, throttle, or add protocol framing.
Most application code shouldn't operate on a raw sink directly, but rather on a buffered Sink which is both more efficient and more convenient. Use buffered to wrap any raw sink with a buffer.
Implementors should abstain from throwing exceptions other than those that are documented for RawSink methods.
Thread-safety guarantees
RawSink implementations are not required to be thread safe. However, if an implementation provides some thread safety guarantees, it is recommended to explicitly document them.