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 an error

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 an error

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 an error

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 an error

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 an error

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 an error

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 an error

writeVarInt

(int value)

returns error?

Reads a variable length integer.

Parameters

  • Return Type

    (error?)
  • value of the integer which is read or an error

close

()

returns error?

Closes the data channel.

  • Return Type

    (error?)
  • nill if the channel is closed successfully or an i/o error