Input
Its base object for BytesInput, FileInput, Socket input (including SSL).
All functions which read data throw Eof when the end of the stream is reached. Use pcall for capturing "Eof" error.
Properties:
bigEndian |
Endianness (word byte order) used when reading numbers. |
Methods:
readByte() |
read byte from current position |
|
readBytes(bytes, pos, len) |
Read len bytes and write them into bytes to the position specified by pos. |
bytes - Bytes object pos - write to position len - actual length |
close() |
Close the input source. |
|
readAll(bufSize) |
Read and return all available data. |
bufSize - size of chunks |
readFullBytes(bytes, pos, len) |
Read len bytes and write them into bytes to the position specified by pos. |
bytes - Bytes object pos - write to position len - actual length |
read(nbytes) |
Read and return nbytes bytes. |
nbytes - requested size |
readUntil(end) |
Read a string until a character code specified by end is occurred. |
end - character code |
readLine() |
Read a line of text separated by CR and/or LF bytes. |
|
readString(len) |
Read and len bytes as a string. |
len - requested size |
readFloat() |
Read a 32-bit floating point number. |
|
readDouble() |
Read a 64-bit double-precision floating point number. |
|
readInt8() |
Read a 8-bit signed integer. |
|
readInt16() |
Read a 16-bit signed integer. |
|
readUInt16() |
Read a 16-bit unsigned integer. |
|
readInt24() |
Read a 24-bit signed integer. |
|
readUInt24() |
Read a 24-bit unsigned integer. |
|
readInt32() |
Read a 32-bit signed integer. |
|
Created with the Personal Edition of HelpNDoc: Full-featured EPub generator