Interface OutputStream

A stream interface that allows to write data into it. Methods shouldn't throw on full disk, may throw on a more serious error

interface OutputStream
  : Stream ;


getPosition[get] ulongReturns current position


flush () Implementation-specific method. Usually it writes any unwritten data from output buffer
writeable () Returns true if stream can be written to, false otherwise
writeArray (array) Attempts to write an array. Returns true if all elements were written, false otherwise
writeBE (value) Writes an integer in big-endian encoding
writeBytes (buffer, count) Attempts to write count bytes from the memory pointed by buffer. Returns number of bytes actually written
writeLE (value) Writes an integer in little-endian encoding
writeStringz (text) Attempts to write a string as zero-terminated. Returns true if entire string was written, false otherwise
close () Closes the stream. Closed stream cannot be read or written any more
position (pos) Attempts to set current position to pos. Throws SeekException on failure
seek (amount) Relatively changes position. amount defines an offset from the current position (can be negative). Throws SeekException on failure
seekable () Returns true if it is legal to use Seekable functionality on this stream
setPosition (pos) Attempts to set current position to pos. Returns true on success, false on failure
size () Returns the size of a stream in bytes