FileOutputStream
class in package klyn.io

    public class FileOutputStream implements OutputStream:

FileOutputStream
All Implemented Interfaces: OutputStream

File-backed binary output stream.

Opening the stream truncates the target file.

    import klyn.io

    try stream = FilePath("payload.bin").openOutputStream():
    stream.write("OK")

Constructors

Modifier and Type | Member | Description
--- | --- | ---
public | FileOutputStream `FileOutputStream(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 | write `write(value as String) as Void throws IOException:` | Performs a text or binary I/O operation.
public | writeBytes `writeBytes(value as Array<Byte>) as Void throws IOException:` | Performs a text or binary I/O operation.

Methods inherited from OutputStream: write, writeBytes
Methods inherited from AutoClosable: close