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

Quick Search    Search Deep

java.nio
Class DoubleBufferImpl  view DoubleBufferImpl download DoubleBufferImpl.java

java.lang.Object
  extended byjava.nio.Buffer
      extended byjava.nio.DoubleBuffer
          extended byjava.nio.DoubleBufferImpl
All Implemented Interfaces:
java.lang.Comparable

final class DoubleBufferImpl
extends DoubleBuffer

This is a Heap memory implementation


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

DoubleBufferImpl

DoubleBufferImpl(int capacity)

DoubleBufferImpl

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

Specified by:
slice in class DoubleBuffer

duplicate

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

Specified by:
duplicate in class DoubleBuffer

asReadOnlyBuffer

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

Specified by:
asReadOnlyBuffer in class DoubleBuffer

compact

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

Specified by:
compact in class DoubleBuffer

isDirect

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

Specified by:
isDirect in class DoubleBuffer

get

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

Specified by:
get in class DoubleBuffer

put

public DoubleBuffer put(double value)
Relative put method. Writes value to the next position in the buffer.

Specified by:
put in class DoubleBuffer

get

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

Specified by:
get in class DoubleBuffer

put

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

Specified by:
put in class DoubleBuffer

order

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

Specified by:
order in class DoubleBuffer