Object -
io
:
ReadableDataChannel
Represents a data channel for reading data.
Constructor
__init
(ReadableByteChannel byteChannel, ByteOrder bOrder)
- byteChannel ReadableByteChannel
- bOrder ByteOrder BE
Methods
Reads a 16 bit integer.
Reads a 32 bit integer.
Reads a 64 bit integer.
Reads 32 bit float.
Reads 64 bit float.
Reads 1 byte and convert it's value to boolean.
Reads string value represented through the provided number of bytes.
Reads a variable length integer.
Closes the data channel.
Reads a 16 bit integer.
-
Return Type
(int | Error) value of the integer which is read or
Error
if any error occurred
Reads a 32 bit integer.
-
Return Type
(int | Error) value of the integer which is read or
Error
if any error occurred
Reads a 64 bit integer.
-
Return Type
(int | Error) value of the integer which is read or
Error
if any error occurred
Reads 32 bit float.
-
Return Type
(float | Error) value of the float which is read or
Error
if any error occurred
Reads 64 bit float.
-
Return Type
(float | Error) value of the float which is read or
Error
if any error occurred
Reads 1 byte and convert it's value to boolean.
-
Return Type
(boolean | Error) boolean value which is read or
Error
if any error occurred
Reads string value represented through the provided number of bytes.
Parameters
- nBytes int
-
specifies the number of bytes which represents the string
- encoding string
-
specifies the char-set encoding of the string
-
Return Type
(string | Error) value of the string or an error
Reads a variable length integer.
-
Return Type
(int | Error) value of the integer which is read or
Error
if any error occurred