JBuffer class
A container for data of a specific primitive type.
The bindings for java.nio.Buffer
.
A buffer is a linear, finite sequence of elements of a specific primitive type. Aside from its content, the essential properties of a buffer are its capacity, limit, and position.
There is one subclass of this class for each non-boolean primitive type.
We currently only have the bindings for java.nio.ByteBuffer
in this
package as JByteBuffer.
- Inheritance
- Implementers
- Available extensions
Constructors
- JBuffer.fromReference(JReference reference)
Properties
-
$type
→ JObjType<
JBuffer> -
latefinal
- array → JObject
-
The array that backs this buffer.
no setter
- arrayOffset → int
-
The offset within this buffer's backing array of the first element
of the buffer.
no setter
- capacity → int
-
The number of elements this buffer contains.
no setter
- hasArray → bool
-
Whether or not this buffer is backed by an accessible array.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasRemaining → bool
-
Whether there are any elements between the current position and
the limit.
no setter
- isDirect → bool
-
Whether or not this buffer is direct.
no setter
- isNull → bool
-
no setterinherited
- isReadOnly → bool
-
Whether or not this buffer is read-only.
no setter
- isReleased → bool
-
no setterinherited
- jClass → JClass
-
Returns JClass corresponding to concrete class of this object.
no setterinherited
- limit ↔ int
-
The index of the first element that should not be read or written.
getter/setter pair
- position ↔ int
-
The index of the next element to be read or written.
getter/setter pair
- reference → JReference
-
finalinherited
- remaining → int
-
The number of elements between the current position and the
limit.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
castTo<
T extends JObject> (JObjType< T> type, {bool releaseOriginal = false}) → T -
Casts this object to another
type
.inherited -
clear(
) → void - Clears this buffer.
-
flip(
) → void - Flips this buffer.
-
mark(
) → void - Sets this buffer's mark at its position.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
release(
) → void -
Releases the underlying reference.
inherited
-
releasedBy(
Arena arena) → void -
Registers this object to be released at the end of
arena
's lifetime.inherited -
reset(
) → void - Resets this buffer's position to the previously-marked position.
-
rewind(
) → void - Rewinds this buffer.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- type → const JBufferType
- The type which includes information such as the signature of this class.