Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

java.nio
Class ShortBufferImpl  view ShortBufferImpl download ShortBufferImpl.java

java.lang.Object
  extended byjava.nio.Buffer
      extended byjava.nio.ShortBuffer
          extended byjava.nio.ShortBufferImpl
All Implemented Interfaces:
java.lang.Comparable

final class ShortBufferImpl
extends ShortBuffer

This is a Heap memory implementation


Field Summary
private  boolean readOnly
           
 
Fields inherited from class java.nio.ShortBuffer
array_offset, backing_buffer
 
Fields inherited from class java.nio.Buffer
address, cap, limit, mark, pos
 
Constructor Summary
(package private) ShortBufferImpl(int capacity)
           
(package private) ShortBufferImpl(short[] buffer, int offset, int capacity, int limit, int position, int mark, boolean readOnly)
           
 
Method Summary
 ShortBuffer asReadOnlyBuffer()
          Creates a new read-only ShortBuffer that shares this buffer's content.
 ShortBuffer compact()
          Compacts this buffer.
 ShortBuffer duplicate()
          Creates a new ShortBuffer that shares this buffer's content.
 short get()
          Reads the short at this buffer's current position, and then increments the position.
 short 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.
 ShortBuffer put(int index, short value)
          Absolute put method.
 ShortBuffer put(short value)
          Relative put method.
 ShortBuffer slice()
          Creates a new ShortBuffer whose content is a shared subsequence of this buffer's content.
 
Methods inherited from class java.nio.ShortBuffer
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
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

readOnly

private boolean readOnly
Constructor Detail

ShortBufferImpl

ShortBufferImpl(int capacity)

ShortBufferImpl

ShortBufferImpl(short[] buffer,
                int offset,
                int capacity,
                int limit,
                int position,
                int mark,
                boolean readOnly)
Method Detail

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 ShortBuffer slice()
Description copied from class: ShortBuffer
Creates a new ShortBuffer whose content is a shared subsequence of this buffer's content.

Specified by:
slice in class ShortBuffer

duplicate

public ShortBuffer duplicate()
Description copied from class: ShortBuffer
Creates a new ShortBuffer that shares this buffer's content.

Specified by:
duplicate in class ShortBuffer

asReadOnlyBuffer

public ShortBuffer asReadOnlyBuffer()
Description copied from class: ShortBuffer
Creates a new read-only ShortBuffer that shares this buffer's content.

Specified by:
asReadOnlyBuffer in class ShortBuffer

compact

public ShortBuffer compact()
Description copied from class: ShortBuffer
Compacts this buffer.

Specified by:
compact in class ShortBuffer

isDirect

public boolean isDirect()
Description copied from class: ShortBuffer
Tells wether or not this buffer is direct.

Specified by:
isDirect in class ShortBuffer

get

public short get()
Reads the short at this buffer's current position, and then increments the position.

Specified by:
get in class ShortBuffer

put

public ShortBuffer put(short value)
Relative put method. Writes value to the next position in the buffer.

Specified by:
put in class ShortBuffer

get

public short get(int index)
Absolute get method. Reads the short at position index.

Specified by:
get in class ShortBuffer

put

public ShortBuffer put(int index,
                       short value)
Absolute put method. Writes value to position index in the buffer.

Specified by:
put in class ShortBuffer

order

public ByteOrder order()
Description copied from class: ShortBuffer
Returns the byte order of this buffer.

Specified by:
order in class ShortBuffer