public FileOutputStream(notnull path as String, append as Boolean = false)
Opens a binary file, truncating by default and retaining its buffered handle.
| Parameter | Description |
|---|---|
path | Destination filename; its parent must exist. |
append | True appends instead of truncating; use for resumable downloads. |
try stream = FileOutputStream("data.bin"):
stream.write("header")