java.nio
Class IntBufferImpl

java.lang.Object
java.nio.Buffer
java.nio.IntBuffer
java.nio.IntBufferImpl
- All Implemented Interfaces:
- java.lang.Comparable
- final class IntBufferImpl
- extends IntBuffer
This is a Heap memory implementation
|
Constructor Summary |
(package private) |
IntBufferImpl(int capacity)
|
(package private) |
IntBufferImpl(int[] buffer,
int offset,
int capacity,
int limit,
int position,
int mark,
boolean readOnly)
|
|
Method Summary |
IntBuffer |
asReadOnlyBuffer()
Creates a new read-only IntBuffer that shares this
buffer's content. |
IntBuffer |
compact()
Compacts this buffer. |
IntBuffer |
duplicate()
Creates a new IntBuffer that shares this buffer's
content. |
int |
get()
Reads the int at this buffer's current position,
and then increments the position. |
int |
get(int index)
Absolute get method. |
boolean |
isDirect()
Tells wether or not this buffer is direct. |
boolean |
isReadOnly()
Tells whether this buffer is read only or not. |
ByteOrder |
order()
Returns the byte order of this buffer. |
IntBuffer |
put(int value)
Relative put method. |
IntBuffer |
put(int index,
int value)
Absolute put method. |
IntBuffer |
slice()
Creates a new IntBuffer whose content is a shared
subsequence of this buffer's content. |
| Methods inherited from class java.nio.IntBuffer |
allocate, array, arrayOffset, compareTo, equals, get, get, hasArray, hashCode, put, put, put, wrap, wrap |
| Methods inherited from class java.nio.Buffer |
capacity, checkArraySize, checkForOverflow, checkForOverflow, checkForUnderflow, checkForUnderflow, checkIfReadOnly, checkIndex, clear, flip, hasRemaining, limit, limit, mark, position, position, remaining, reset, rewind |
readOnly
private boolean readOnly
IntBufferImpl
IntBufferImpl(int capacity)
IntBufferImpl
IntBufferImpl(int[] buffer,
int offset,
int capacity,
int limit,
int position,
int mark,
boolean readOnly)
isReadOnly
public boolean isReadOnly()
- Description copied from class:
Buffer
- Tells whether this buffer is read only or not.
- Specified by:
isReadOnly in class Buffer
slice
public IntBuffer slice()
- Description copied from class:
IntBuffer
- Creates a new
IntBuffer whose content is a shared
subsequence of this buffer's content.
- Specified by:
slice in class IntBuffer
duplicate
public IntBuffer duplicate()
- Description copied from class:
IntBuffer
- Creates a new
IntBuffer that shares this buffer's
content.
- Specified by:
duplicate in class IntBuffer
asReadOnlyBuffer
public IntBuffer asReadOnlyBuffer()
- Description copied from class:
IntBuffer
- Creates a new read-only
IntBuffer that shares this
buffer's content.
- Specified by:
asReadOnlyBuffer in class IntBuffer
compact
public IntBuffer compact()
- Description copied from class:
IntBuffer
- Compacts this buffer.
- Specified by:
compact in class IntBuffer
isDirect
public boolean isDirect()
- Description copied from class:
IntBuffer
- Tells wether or not this buffer is direct.
- Specified by:
isDirect in class IntBuffer
get
public int get()
- Reads the
int at this buffer's current position,
and then increments the position.
- Specified by:
get in class IntBuffer
put
public IntBuffer put(int value)
- Relative put method. Writes
value to the next position
in the buffer.
- Specified by:
put in class IntBuffer
get
public int get(int index)
- Absolute get method. Reads the
int at position
index.
- Specified by:
get in class IntBuffer
put
public IntBuffer put(int index,
int value)
- Absolute put method. Writes
value to position
index in the buffer.
- Specified by:
put in class IntBuffer
order
public ByteOrder order()
- Description copied from class:
IntBuffer
- Returns the byte order of this buffer.
- Specified by:
order in class IntBuffer