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.

Methods

readByte():Int

Read and return one byte.

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.

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

Read len bytes and write them into s to the position specified by pos.

Unlike readBytes, this method tries to read the exact len amount of bytes.

readString(len:Int):String

Read and len bytes as a string.