klyn.io.FileOutputStream.seek
method
public seek(offset as Long) as Void
Description

Positions the file at an absolute byte offset; the next write may overwrite. Append-mode writes still go to EOF, regardless of this position.

Parameters
ParameterDescription
offsetNon-negative byte position from the start of the file.
Throws
  • IndexException for a negative offset.
  • IOException if the stream is closed or seeking fails.
Example

stream.seek(8l); stream.writeBytes(header)