Constructor

new()

Methods

getBytes():Bytes

Returns the Bytes of this output.

This function should not be called more than once on a given BytesOutput instance.

Inherited Variables

Defined by Output

read onlybigEndian:Bool

Available with gif plugin

Endianness (word byte order) used when writing numbers.

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

Inherited Methods

Defined by Output

close():Void

Available with clay native, gif plugin

Close the output.

Behaviour while writing after calling this method is unspecified.

write(s:Bytes):Void

Available with clay native, gif plugin

Write all bytes stored in s.

writeFullBytes(s:Bytes, pos:Int, len:Int):Void

Available with clay native, gif plugin, tilemap plugin, unity

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

Unlike writeBytes, this method tries to write the exact len amount of bytes.

writeInput(i:Input, ?bufsize:Int):Void

Available on clay native

Read all available data from i and write it.

The bufsize optional argument specifies the size of chunks by which data is read and written. Its default value is 4096.

writeString(s:String, ?encoding:Encoding):Void

Available with clay native, gif plugin, unity

Write s string.

flush():Void

Available with gif plugin

Flush any buffered data.

writeInt16(x:Int):Void

Available with gif plugin

Write x as 16-bit signed integer.

Endianness is specified by the bigEndian property.

writeUInt16(x:Int):Void

Available with gif plugin

Write x as 16-bit unsigned integer.

Endianness is specified by the bigEndian property.