Known Direct Subclasses |
Public Constructors
Public Methods
DataBuffer<T> |
copyTo(DataBuffer<T> dst, long size)
Write the references of the objects in the source array into this buffer.
|
boolean |
equals(Object obj)
|
int |
hashCode()
|
DataBuffer<T> |
read(T[] dst, int offset, int length)
Read the references of the objects in this buffer into the destination array.
|
DataBuffer<T> |
write(T[] src, int offset, int length)
Bulk put method, using int arrays.
|
Inherited Methods
boolean |
equals(Object arg0)
|
final Class<?> |
getClass()
|
int |
hashCode()
|
final void |
notify()
|
final void |
notifyAll()
|
String |
toString()
|
final void |
wait(long arg0, int arg1)
|
final void |
wait(long arg0)
|
final void |
wait()
|
abstract <R> R | |
abstract DataBuffer<T> |
copyTo(DataBuffer<T> dst, long size)
Write the references of the objects in the source array into this buffer.
|
abstract boolean |
equals(Object obj)
Checks equality between data buffers.
|
abstract T |
getObject(long index)
Reads the value at the given index.
|
abstract boolean |
isReadOnly()
Tells whether or not this buffer is backed by an accessible array.
|
abstract DataBuffer<T> |
narrow(long size)
Creates a new buffer whose content is a shared subsequence of this buffer's content, whose
size is set to the given value.
|
abstract DataBuffer<T> |
offset(long index)
Creates a new buffer whose content is a shared subsequence of this buffer's content, starting
at the given index.
|
abstract DataBuffer<T> |
read(T[] dst)
Read the references of the objects in this buffer into the destination array.
|
abstract DataBuffer<T> |
read(T[] dst, int offset, int length)
Read the references of the objects in this buffer into the destination array.
|
abstract DataBuffer<T> |
setObject(T value, long index)
Writes the given value into this buffer at the given index.
|
abstract long |
size()
Size of the buffer, in elements.
|
abstract DataBuffer<T> |
slice(long index, long size)
Creates a new buffer whose content is a shared subsequence of this buffer's content, starting
at the given index and of the given size.
|
abstract DataBufferWindow<? extends DataBuffer<T>> |
window(long size)
Creates a
DataBufferWindow that provides a partial view of this buffer. |
abstract DataBuffer<T> |
write(T[] src)
Write the references of the objects in the source array into this buffer.
|
abstract DataBuffer<T> |
write(T[] src, int offset, int length)
Bulk put method, using int arrays.
|
Public Constructors
public AbstractDataBuffer ()
Public Methods
public DataBuffer<T> copyTo (DataBuffer<T> dst, long size)
Write the references of the objects in the source array into this buffer.
If there are more values to copy than the destination buffer size, i.e.
size > dst.size()
, then no values are transferred and a
BufferOverflowException is thrown. On the other hand, if there are more values to copy that
the source buffer size, i.e. > src.size()
, then a BufferUnderfloatException is thrown.
Otherwise, this method copies n = size
values from this buffer into
the destination buffer.
Parameters
dst | the destination buffer into which values are copied; must not be this buffer |
---|---|
size | number of values to copy to the destination buffer |
Returns
- this buffer
public boolean equals (Object obj)
public int hashCode ()
public DataBuffer<T> read (T[] dst, int offset, int length)
Read the references of the objects in this buffer into the destination array.
This method transfers values from this buffer into the given destination array. If there are
fewer values in the buffer than are required to satisfy the request, that is, if
length > size()
, then no values are transferred and a
BufferUnderflowException is thrown.
Otherwise, this method copies n = length
values from this buffer into the given array
starting at the given offset.
Parameters
dst | the array into which values are to be written |
---|---|
offset | the offset within the array of the first value to be written; must be
non-negative and no larger than dst.length |
length | the maximum number of values to be written to the given array; must be
non-negative and no larger than dst.length - offset |
Returns
- this buffer
public DataBuffer<T> write (T[] src, int offset, int length)
Bulk put method, using int arrays.
This method transfers the values in the given source array into this buffer. If there are
more values in the source array than in this buffer, that is, if
length > size()
, then no values are transferred and a
BufferOverflowException is thrown.
Otherwise, this method copies n = length
values from the given array into this buffer,
starting at the given offset.
Parameters
src | the source array from which values are to be read |
---|---|
offset | the offset within the array of the first value to be read; must be non-negative
and no larger than src.length |
length | the number of values to be read from the given array; must be non-negative and no
larger than src.length - offset |
Returns
- this buffer