Creates a new Writer
and initialises the
wrapped buffer to the default size of 8.
The wrapped buffer.
The current index of the buffer.
Ensures there is enough capacity in the current buffer to store addedBytes
more bytes.
The number of bytes which need to be added.
Writes a single byte to the buffer. Writes 1
if the value is true
and 0
otherwise.
The value to write.
Writes a 1 byte integer to the buffer.
The value to write.
Writes the length of the array as a 2 byte integer, then writes length
bytes to the buffer.
The value to write.
Writes a 4 byte floating point value to the buffer.
The value to write.
Writes a packet header to the first 5 bytes of this writer's buffer.
The id to write to the header.
Writes a 4 byte integer to the buffer.
The value to write.
Writes a 2 byte integer to the buffer.
The value to write.
Writes the length of the string as a 2 byte integer, then writes the string to the buffer.
The value to write.
The same as writeString()
, but writes 4 bytes for the length.
The value to write.
Writes a 4 byte unsigned integer to the buffer.
The value to write.
Writes a 1 byte unsigned integer to the buffer.
The value to write.
Writes a 2 byte unsigned integer to the buffer.
The value to write.
Generated using TypeDoc
A wrapper class which provides methods for writing data to a buffer.