Io::Buffer - mfichman/jogo GitHub Wiki
Container for a static array of bytes. This class is implemented using the 'C struct hack', so allocating a buffer of a certain size will allocate a contiguous block of memory for this object. As such, the actual runtime size of this object depends on the capacity value passed to the constructor.
@init(size Int)
Creates a new buffer with capacity for 'size' bytes.
@insert(index Int, byte Byte)
Sets the byte at 'index' to 'byte'.
@index(index Int) Byte
Returns the byte at 'index'.
begin=(value Int)
Sets the index of the first byte stored in this buffer. Note that this does not change the capacity. Setting this value to a number greater than the capacity or 'end' results in 'begin' being set to the minimum of those two values.
end=(value Int)
Sets the index following the last byte stored in this buffer.
@destroy()
No comment
capacity?() Int
No comment
begin?() Int
No comment
end?() Int
No comment