public class Files:
Lightweight full-file I/O helpers.
Files is intended for simple whole-file operations where a stream object would only add lifecycle overhead. Use FileInputStream, FileOutputStream, FileReader or FileWriter when incremental processing is required.
import klyn.io
data as Byte[] = Byte[3]
data[0] = Byte(65)
data[1] = Byte(66)
data[2] = Byte(67)
Files.writeBytes("payload.bin", data)| Modifier and Type | Member | Description |
|---|---|---|
| public static | writeBytes | Writes bytes to a file, replacing existing content. |
| public static | writeBytesWithPrefix | Writes a text prefix followed by bytes to a file, replacing existing content. |