Your browser does not support HTML5 canvas. Fork me on GitHub

Available Packages:

ByteBuffer

Source

class ByteBuffer

Source

function getByte(int i) returns int

Source

function getInt(int i) returns int

Source

function getIntCount() returns int

Source

function hasByte() returns boolean

Source

function readByte() returns int

Source

Reads a single unsigned byte from this buffer. The returned value will be in the range [0, 255].

function readInt() returns int

Source

Reads a single signed integer from this buffer.

function readShort() returns int

Source

Reads a single unsigned short from this buffer. The returned value will be in the range [0, 65535].

function resetRead()

Source

function size() returns int

Source

Returns the number of bytes in the buffer.

function truncate(int size)

Source

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.

function writeByte(int n)

Source

Writes an unsigned byte into the buffer.

function writeByteUnsafe(int n)

Source

Writes an unsigned byte into the buffer. You must be sure that the provided integer is in the range [0, 255].

function writeInt(int n)

Source

Writes a signed integer into the buffer.

function writeShort(int n)

Source

Writes an unsigned short into the buffer.

function writeShortUnsafe(int n)

Source

Writes an unsigned short into the buffer. You must be sure that the provided integer is in the range [0, 65535].