class Input
package haxe.io
extended by BytesInput
Available with clay native, headless, tilemap plugin, unity
An Input is an abstract reader. See other classes in the haxe.io
package
for several possible implementations.
All functions which read data throw Eof
when the end of the stream
is reached.
Variables
Methods
readBytes(s:Bytes, pos:Int, len:Int):Int
Read len
bytes and write them into s
to the position specified by pos
.
Returns the actual length of read data that can be smaller than len
.
See readFullBytes
that tries to read the exact amount of specified bytes.
close():Void
Available on clay native
Close the input source.
Behaviour while reading after calling this method is unspecified.
readAll(?bufsize:Int):Bytes
Read and return all available data.
The bufsize
optional argument specifies the size of chunks by
which data is read. Its default value is target-specific.
readUntil(end:Int):String
Available with tilemap plugin
Read a string until a character code specified by end
is occurred.
The final character is not included in the resulting string.
readUInt16():Int
Available with tilemap plugin
Read a 16-bit unsigned integer.
Endianness is specified by the bigEndian
property.