Reads a single unsigned byte from this buffer. The returned value will be in the range [0, 255].
Reads a single signed integer from this buffer.
Reads a single unsigned short from this buffer. The returned value will be in the range [0, 65535].
Returns the number of bytes in the buffer.
Assures that the number of bytes is not bigger than the provided one. If it is, throws bytes from the end of the buffer away so that the number of bytes in the buffer will be exactly the provided one. Should not be used when reading from the buffer.
Writes an unsigned byte into the buffer.
Writes an unsigned byte into the buffer. You must be sure that the provided integer is in the range [0, 255].
Writes a signed integer into the buffer.
Writes an unsigned short into the buffer.
Writes an unsigned short into the buffer. You must be sure that the provided integer is in the range [0, 65535].