Class jls.lang.ByteBuffer


Extends jls.lang.Buffer.
The buffer class provides facilities to get and put datas from/to a native byte array.
Defined in: ByteBuffer.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Method Summary
Method Attributes Method Name and Description
<static>  
jls.lang.ByteBuffer.allocate(capacity)
Allocates a new buffer.
 
Returns the native byte array of this buffer.
 
Creates a new buffer sharing the native byte array.
 
free()
Free the associated byte array.
<static>  
jls.lang.ByteBuffer.fromString(s, csn)
TODO Remove
 
getByte(signed)
Gets a byte from this buffer at the current position, and then increments the position.
 
Puts a byte into this buffer at the current position, and then increments the position.
 
Creates a new buffer starting at the current position and with the remaining bytes.
<static>  
jls.lang.ByteBuffer.wrap(barray, offset, length)
Wraps an existing native byte array into a new buffer.
Methods borrowed from class jls.lang.Buffer:
capacity, clear, flip, getOffset, incrementPosition, limit, offset, position, remaining, setLimit, setPosition
Class Detail
jls.lang.ByteBuffer()
Method Detail
<static> {jls.lang.Buffer} jls.lang.ByteBuffer.allocate(capacity)
Allocates a new buffer.
Parameters:
{Number} capacity
The capacity of the byte array.
Returns:
{jls.lang.Buffer} The new buffer.

{_native.core.ByteArray} byteArray()
Returns the native byte array of this buffer.
Returns:
{_native.core.ByteArray} The native byte array.

{jls.lang.Buffer} duplicate()
Creates a new buffer sharing the native byte array.
Returns:
{jls.lang.Buffer} The new buffer.

{jls.lang.Buffer} free()
Free the associated byte array.
Returns:
{jls.lang.Buffer} This buffer.

<static> jls.lang.ByteBuffer.fromString(s, csn)
TODO Remove
Parameters:
s
csn

{Number} getByte(signed)
Gets a byte from this buffer at the current position, and then increments the position.
Parameters:
{Boolean} signed
Whether the byte to get is signed.
Returns:
{Number} The byte.

{jls.lang.Buffer} putByte(b)
Puts a byte into this buffer at the current position, and then increments the position.
Parameters:
{Number} b
The byte to put.
Returns:
{jls.lang.Buffer} This buffer.

{jls.lang.Buffer} slice()
Creates a new buffer starting at the current position and with the remaining bytes.
Returns:
{jls.lang.Buffer} The new buffer.

<static> {jls.lang.Buffer} jls.lang.ByteBuffer.wrap(barray, offset, length)
Wraps an existing native byte array into a new buffer.
Parameters:
{ByteArray} barray
The native byte array to wrap.
{Number} offset
The offset of the byte array to use for this buffer.
{Number} length
The length of the buffer.
Returns:
{jls.lang.Buffer} The new buffer.

Documentation generated by JsDoc Toolkit 2.3.2 on Sat Jan 08 2011 02:00:13 GMT+0100 (CET)