klyn.io.FileOutputStream.FileOutputStream
constructor
public FileOutputStream(notnull path as String, append as Boolean = false)
Description

Opens a binary file, truncating by default and retaining its buffered handle.

Parameters
ParameterDescription
pathDestination filename; its parent must exist.
appendTrue appends instead of truncating; use for resumable downloads.
Throws
  • IOException if the file cannot be opened.
  • NullException if path is null at runtime; statically null arguments are rejected with TypeError.
Example
try stream = FileOutputStream("data.bin"):
    stream.write("header")