An Output is an abstract write. A specific output implementation will only have to override the writeByte and maybe the write, flush and close methods. See File.write and String.write for two ways of creating an Output.

Variables

read onlybigEndian:Bool

Endianness (word byte order) used when writing numbers.

If true, big-endian is used, otherwise little-endian is used.

Methods

write (s:Bytes):Void

Write all bytes stored in s.

writeByte (c:Int):Void

Write one byte.

writeBytes (s:Bytes, pos:Int, len:Int):Int

Write len bytes from s starting by position specified by pos.

Returns the actual length of written data that can differ from len.

See writeFullBytes that tries to write the exact amount of specified bytes.

writeFloat (x:Float):Void

Write x as 32-bit floating point number.

Endianness is specified by the bigEndian property.

writeInt32 (x:Int):Void

Write x as 32-bit signed integer.

Endianness is specified by the bigEndian property.