Build 1.0_r1(from source)

java.nio
Class IntArrayBuffer

java.lang.Object
  extended by java.nio.Buffer
      extended by java.nio.IntBuffer
          extended by java.nio.IntArrayBuffer
All Implemented Interfaces:
Comparable<IntBuffer>
Direct Known Subclasses:
ReadOnlyIntArrayBuffer, ReadWriteIntArrayBuffer

abstract class IntArrayBuffer
extends IntBuffer

IntArrayBuffer, ReadWriteIntArrayBuffer and ReadOnlyIntArrayBuffer compose the implementation of array based int buffers.

IntArrayBuffer implements all the shared readonly methods and is extended by the other two classes.

All methods are marked final for runtime performance.


Field Summary
protected  int[] backingArray
           
protected  int offset
           
 
Fields inherited from class java.nio.Buffer
_elementSizeShift, capacity, limit, mark, position, UNSET_MARK
 
Constructor Summary
IntArrayBuffer(int capacity)
           
IntArrayBuffer(int[] array)
           
IntArrayBuffer(int capacity, int[] backingArray, int offset)
           
 
Method Summary
 int get()
          Returns the int at the current position and increase the position by 1.
 int get(int index)
          Returns a int at the specified index, and the position is not changed.
 IntBuffer get(int[] dest, int off, int len)
          Reads ints from the current position into the specified int array, starting from the specified offset, and increase the position by the number of ints read.
 boolean isDirect()
          Returns true if this buffer is direct.
 ByteOrder order()
          Returns the byte order used by this buffer when converting ints from/to bytes.
 
Methods inherited from class java.nio.IntBuffer
_array, _arrayOffset, allocate, array, arrayOffset, asReadOnlyBuffer, compact, compareTo, duplicate, equals, get, hasArray, hashCode, protectedArray, protectedArrayOffset, protectedHasArray, put, put, put, put, put, slice, toString, wrap, wrap
 
Methods inherited from class java.nio.Buffer
capacity, clear, flip, hasRemaining, isReadOnly, limit, limit, mark, position, position, remaining, reset, rewind
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

backingArray

protected final int[] backingArray

offset

protected final int offset
Constructor Detail

IntArrayBuffer

IntArrayBuffer(int[] array)

IntArrayBuffer

IntArrayBuffer(int capacity)

IntArrayBuffer

IntArrayBuffer(int capacity,
               int[] backingArray,
               int offset)
Method Detail

get

public final int get()
Description copied from class: IntBuffer
Returns the int at the current position and increase the position by 1.

Specified by:
get in class IntBuffer
Returns:
The int at the current position.

get

public final int get(int index)
Description copied from class: IntBuffer
Returns a int at the specified index, and the position is not changed.

Specified by:
get in class IntBuffer
Parameters:
index - The index, must be no less than zero and less than limit
Returns:
A int at the specified index.

get

public final IntBuffer get(int[] dest,
                           int off,
                           int len)
Description copied from class: IntBuffer
Reads ints from the current position into the specified int array, starting from the specified offset, and increase the position by the number of ints read.

Overrides:
get in class IntBuffer
Parameters:
dest - The target int array
off - The offset of the int array, must be no less than zero and no greater than dest.length
len - The number of ints to read, must be no less than zero and no greater than dest.length - off
Returns:
This buffer

isDirect

public final boolean isDirect()
Description copied from class: IntBuffer
Returns true if this buffer is direct.

A int buffer is direct, if it is based on a byte buffer and the byte buffer is direct.

Specified by:
isDirect in class IntBuffer
Returns:
True if this buffer is direct.

order

public final ByteOrder order()
Description copied from class: IntBuffer
Returns the byte order used by this buffer when converting ints from/to bytes.

If this buffer is not based on a byte buffer, then always return the platform's native byte order.

Specified by:
order in class IntBuffer
Returns:
The byte order used by this buffer when converting ints from/to bytes.

Build 1.0_r1(from source)

Please submit a feedback, bug or feature