Class: ReadableDataChannel
Represents a data channel for reading data.
Constructor
Initializes the data channel.
init (ReadableByteChannel byteChannel, ByteOrder bOrder)
- byteChannel ReadableByteChannel
The channel, which would represent the source to read/write data
- bOrder ByteOrder "BE"
network byte order
Methods
readInt16 | Reads a 16 bit integer. |
readInt32 | Reads a 32 bit integer. |
readInt64 | Reads a 64 bit integer. |
readFloat32 | Reads a 32 bit float. |
readFloat64 | Reads a 64 bit float. |
readBool | Reads a byte and convert its value to boolean. |
readString | Reads the string value represented through the provided number of bytes. |
readVarInt | Reads a variable length integer. |
close | Closes the data channel. |
readString
Isolated Function
Reads the string value represented through the provided number of bytes.
1string|io:Error string = dataChannel.readString(10, "UTF-8");