Object - io : WritableDataChannel

Represents a WritableDataChannel for writing data.

writeInt16

(int value)

returns Error?

Writes 16 bit integer.

Parameters

  • value int
  • integer which will be written

  • Return Type

    (Error?)
  • nill if the content is written successfully or Error if any error occurred

writeInt32

(int value)

returns Error?

Writes 32 bit integer.

Parameters

  • value int
  • integer which will be written

  • Return Type

    (Error?)
  • nill if the content is written successfully or Error if any error occurred

writeInt64

(int value)

returns Error?

Writes 64 bit integer.

Parameters

  • value int
  • integer which will be written

  • Return Type

    (Error?)
  • nill if the content is written successfully or Error if any error occurred

writeFloat32

(float value)

returns Error?

Writes 32 bit float.

Parameters

  • value float
  • float which will be written

  • Return Type

    (Error?)
  • nill if the float is written successfully or Error if any error occurred

writeFloat64

(float value)

returns Error?

Writes 64 bit float.

Parameters

  • value float
  • float which will be written

  • Return Type

    (Error?)
  • nill if the float is written successfully or Error if any error occurred

writeBool

(boolean value)

returns Error?

Writes boolean.

Parameters

  • value boolean
  • boolean which will be written

  • Return Type

    (Error?)
  • nill if the content is written successfully or Error if any error occurred

writeString

(string value, string encoding)

returns Error?

Writes a given string value to the respective channel.

Parameters

  • value string
  • the value which should be written

  • encoding string
  • the encoding which will represent the value string

  • Return Type

    (Error?)
  • nill if the content is written successfully or Error if any error occurred

writeVarInt

(int value)

returns Error?

Writes a variable length integer.

Parameters

  • value int
  • int which will be written

  • Return Type

    (Error?)
  • value of the integer which is read or Error if any error occurred

close

()

returns Error?

Closes the data channel.

  • Return Type

    (Error?)
  • nill if the channel is closed successfully or Error if any error occurred