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

Quick Search    Search Deep

java.nio
Class LongBufferImpl  view LongBufferImpl download LongBufferImpl.java

java.lang.Object
  extended byjava.nio.Buffer
      extended byjava.nio.LongBuffer
          extended byjava.nio.LongBufferImpl
All Implemented Interfaces:
java.lang.Comparable

final class LongBufferImpl
extends LongBuffer

This is a Heap memory implementation


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

LongBufferImpl

LongBufferImpl(int capacity)

LongBufferImpl

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

Specified by:
slice in class LongBuffer

duplicate

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

Specified by:
duplicate in class LongBuffer

asReadOnlyBuffer

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

Specified by:
asReadOnlyBuffer in class LongBuffer

compact

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

Specified by:
compact in class LongBuffer

isDirect

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

Specified by:
isDirect in class LongBuffer

get

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

Specified by:
get in class LongBuffer

put

public LongBuffer put(long value)
Relative put method. Writes value to the next position in the buffer.

Specified by:
put in class LongBuffer

get

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

Specified by:
get in class LongBuffer

put

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

Specified by:
put in class LongBuffer

order

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

Specified by:
order in class LongBuffer