class Output
package haxe.io
extended by BytesOutput
Available with clay native, gif plugin, headless, tilemap plugin, unity
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
Methods
writeBytes(s:Bytes, pos:Int, len:Int):Int
Available with clay native, gif plugin, tilemap plugin, unity
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.
close():Void
Available with clay native, gif plugin
Close the output.
Behaviour while writing after calling this method is unspecified.
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.
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.