FileInputStream
class in package klyn.io

    public class FileInputStream implements InputStream:

FileInputStream
All Implemented Interfaces: InputStream

File-backed binary input stream.

    import klyn.io

    try stream = FilePath("payload.bin").openInputStream():
    header = stream.readBytes(8)
    print(header.size)

Constructors

Modifier and Type | Member | Description
--- | --- | ---
public | FileInputStream `FileInputStream(path as String):` | No summary.

Methods

Modifier and Type | Member | Description
--- | --- | ---
public | close `close() as Void throws IOException:` | Performs a text or binary I/O operation.
public | read `read() as String throws IOException:` | Performs a text or binary I/O operation.
public | readBytes `readBytes(length as Int) as Array<Byte> throws IOException:` | Performs a text or binary I/O operation.

Inherited Methods
method Inherited Methods from InputStream: read, readBytes
method Inherited Methods from AutoClosable: close