Class jls.lang.CharBuffer
Extends
jls.lang.Buffer.
The buffer class provides facilities to get and put datas from/to a native string.
Defined in: CharBuffer.js.
Class Summary
| Constructor Attributes |
Constructor Name and Description |
| |
|
Method Summary
| Method Attributes |
Method Name and Description |
| <static> |
jls.lang.CharBuffer. allocate(capacity, adoptable)
Allocates a new buffer.
|
| |
Returns the native byte array of this buffer.
|
| |
Creates a new buffer sharing the native string.
|
| |
Free the associated byte array.
|
| |
Gets a character from this buffer at the current position, and then increments the position.
|
| |
Gets a character from this buffer at a specified position.
|
| |
Puts a character 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 character.
|
| <static> |
jls.lang.CharBuffer. wrap(barray, offset, length)
Wraps an existing native byte array into a new character buffer.
|
- Methods borrowed from class jls.lang.Buffer:
- capacity, clear, flip, getOffset, incrementPosition, limit, offset, position, remaining, setLimit, setPosition
Class Detail
jls.lang.CharBuffer()
Method Detail
<static>
{jls.lang.Buffer}
jls.lang.CharBuffer.allocate(capacity, adoptable)
Allocates a new buffer.
- Parameters:
-
{Number} capacity
- The capacity of the character buffer.
-
adoptable
- 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.
Creates a new buffer sharing the native string.
- Returns:
- {jls.lang.Buffer} The new buffer.
Free the associated byte array.
- Returns:
- {jls.lang.Buffer} This buffer.
{Number}
getChar()
Gets a character from this buffer at the current position, and then increments the position.
- Returns:
- {Number} The character code.
{Number}
getCharAt(index)
Gets a character from this buffer at a specified position.
- Parameters:
-
{Number} index
- The position of the character to read.
- Returns:
- {Number} The character code.
Puts a character into this buffer at the current position, and then increments the position.
- Parameters:
-
{Number} c
- The character code to put.
- Returns:
- {jls.lang.Buffer} This buffer.
Creates a new buffer starting at the current position and with the remaining character.
- Returns:
- {jls.lang.Buffer} The new buffer.
<static>
{jls.lang.Buffer}
jls.lang.CharBuffer.wrap(barray, offset, length)
Wraps an existing native byte array into a new character buffer.
- Parameters:
-
{_native.core.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 01:56:36 GMT+0100 (CET)