Object -
io
:
WritableDataChannel
Represents a WritableDataChannel for writing data.
Constructor
__init
(WritableByteChannel byteChannel, ByteOrder bOrder)
- byteChannel WritableByteChannel
-
channel which would represent the source to read/write data
- bOrder ByteOrder BE
-
network byte order
Methods
Writes a 16 bit integer.
Writes a 32 bit integer.
Writes a 64 bit integer.
Writes a 32 bit float.
Writes a 64 bit float.
Writes a boolean.
Writes a given string value to the respective channel.
Writes a variable-length integer.
Closes the data channel.
Writes a 16 bit integer.
io:Error? err = dataChannel.writeInt16(length);
Parameters
- value int
-
The integer, which will be written
-
Return Type
(Error?) ()
if the content is written successfully or else anio:Error
if any error occurred
Writes a 32 bit integer.
io:Error? err = dataChannel.writeInt32(length);
Parameters
- value int
-
The integer, which will be written
-
Return Type
(Error?) ()
if the content is written successfully or elseio:Error
if any error occurred
Writes a 64 bit integer.
io:Error? err = dataChannel.writeInt64(length);
Parameters
- value int
-
The integer, which will be written
-
Return Type
(Error?) ()
if the content is written successfully or elseio:Error
if any error occurred
Writes a 32 bit float.
io:Error? err = dataChannel.writeFloat32(3.12);
Parameters
- value float
-
The float, which will be written
-
Return Type
(Error?) ()
if the float is written successfully or elseio:Error
if any error occurred
Writes a 64 bit float.
io:Error? err = dataChannel.writeFloat32(3.12);
Parameters
- value float
-
The float, which will be written
-
Return Type
(Error?) ()
if the float is written successfully or elseio:Error
if any error occurred
Writes a boolean.
io:Error? err = dataChannel.writeInt64(length);
Parameters
- value boolean
-
The boolean, which will be written
-
Return Type
(Error?) ()
if the content is written successfully or elseio:Error
if any error occurred
Writes a given string value to the respective channel.
io:Error? err = dataChannel.writeString(record);
Parameters
- value string
-
The value, which should be written
- encoding string
-
The encoding, which will represent the value string
-
Return Type
(Error?) ()
if the content is written successfully or elseio:Error
if any error occurred
Writes a variable-length integer.
io:Error? err = dataChannel.writeVarInt(length);
Parameters
- value int
-
The int, which will be written
-
Return Type
(Error?) The value of the integer, which is written or else
io:Error
if any error occurred