InputStream
interface in package klyn.io

    public interface InputStream extends AutoClosable:

AutoClosable
└ InputStream

Binary input stream contract.

Concrete implementations expose a byte-oriented readable resource such as a file or a socket.

    import klyn.io

    stream as InputStream = FilePath("data.bin").openInputStream()
    try:
    chunk = stream.readBytes(16)
    print(chunk.size)
    finally:
    stream.close()

Methods

Modifier and Type | Member | Description
--- | --- | ---
public | read `read() as String throws IOException` | Reads the remaining data as text.
public | readBytes `readBytes(length as Int) as Array<Byte> throws IOException` | Reads up to `length` bytes from the stream.

Inherited Methods
method Inherited Methods from AutoClosable: close