|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object mpjbuf.Buffer
public class Buffer
A buffer object, for holding an mpjdev message.
Through appropriate use of sections, described below,
a single buffer object can contain a mixture of elements of any Java type.
A single buffer object can be reused both for sending and receiving
messages, although at any given time a buffer is either in
a readable state or a writeable state.
A buffer is created with a fixed static capacity which does
not change during the lifetime of the buffer. However a
buffer can also (under user control) store data in a dynamically
allocated region---this is necessary in particular to support
serialized objects. A characteristic feature of the
mpjbuf.Buffer
is that is supports transfer of data from and to non-contiguous
sections of a Java array through various gather and scatter methods.
putSectionHeader()
to mark the start of the section. This is followed by a series
write()
,
gather()
, and/or
strGather()
operations to write the data to the section. When a buffer is
in readable mode, one starts reading a section by invoking
getSectionHeader()
to determine the type of elements in the next section,
and to make it the current section.
This is followed by a series
read()
,
scatter()
, and/or
strScatter()
operations to read the data from the section. Buffers may
only be written and read sequentially, from beginning to end.
In general a buffer object comprises two regions: a primary or static buffer, and a secondary or dynamic buffer. The static buffer has a fixed capacity, specified when the buffer is created. The size of the dynamic buffer grows automatically as new data is written to it. Any section can be created as a static section or a dynamic section, and this controls which region of the buffer the section data is stored in. It is important to note that in general writing to or reading from a static section is much faster than the corresponding operation on a dynamic section. Dynamic sections are required to support storing serialized objects in the buffer. As a convenience to the programmer, dynamic sections holding primitive types are also supported. But in general use of the dynamic buffer is is only recommended for short or infrequent message exchanges.
The overall layout of the static buffer is illustrated in the following figure:
In practise many messages will contain only a single section.
There are up to 7 bytes of padding after each section
to ensure that the next section header begins on a boundary that is a
multiple of ALIGNMENT_UNIT
, which has value 8.
The general layout of an individual section in the static buffer is illustrated in the following figure:
The first byte of the section header defines the type of the section,
encoding one of the possible values
BYTE
,
CHAR
,
SHORT
,
BOOLEAN
,
INT
,
LONG
,
FLOAT
, or
DOUBLE
, if the section is static, or one of
OBJECT
,
BYTE_DYNAMIC
,
CHAR_DYNAMIC
,
SHORT_DYNAMIC
,
BOOLEAN_DYNAMIC
,
INT_DYNAMIC
,
LONG_DYNAMIC
,
FLOAT_DYNAMIC
, or
DOUBLE_DYNAMIC
if the section is dynamic.
The second 4 bytes of the header holds the number of elements
in the section. This numeric value is represented according to the
encoding property of the buffer. The size of the header
in bytes is SECTION_OVERHEAD
, which has value 8.
If the section is static, the header is followed by the values of
the elements, again represented according to the
encoding property of the buffer. If the section is dynamic,
the "Section data" is absent from the diagram above (because the
data is in the dynamic buffer).
The format of the dynamic buffer is entirely determined by the standard Java serialization classes java.io.ObjectOutputStream and java.io.ObjectInputStream.
write()
and
read()
,
which transfer contiguous sections of a Java
array. The generic forms are respectively:
write(type[] source,
int srcOff,
int numEls)
and
read(type[] dest,
int dstOff,
int numEls)
The write()
operation copies the values of elements:
source [srcOff], source [srcOff + 1], ..., source [srcOff + numEls - 1]
to the buffer, in the order shown.
Conversely the read()
,
operation reads numEls values from the buffer and writes
them to the elements:
dest [dstOff], dest [dstOff + 1], ..., dest [dstOff + numEls - 1]
The operations gather()
and
scatter()
transfer
data from or to a subset of elements of a Java array, selected by
giving an index vector. The generic forms are respectively:
gather(type[] source,
int numEls,
int idxOff,
int[] indexes)
and
scatter(type[] dest,
int numEls,
int idxOff,
int[] indexes)
The gather()
operation copies the values of elements:
source [indexes [idxOff]], source [indexes [idxOff + 1]], ..., source [indexes [idxOff + numEls - 1]]
to the buffer, in the order shown.
Conversely the scatter()
operation reads numEls values from the buffer and writes
them to the elements:
dest [indexes [idxOff]], dest [indexes [idxOff + 1]], ..., dest [indexes [idxOff + numEls - 1]]
The operations
strGather()
and
strScatter()
likewise
transfer data from or to a subset of elements of a Java array, but
in these cases the selected subset is a "multi-strided region"
of the Java array. The specification is fairly complex, but these
are useful operations for dealing with multidimensional data
structures, which occur often in scientific programming.
The generic forms are respectively:
strGather(type[] source,
int srcOff,
int rank,
int exts,
int srs,
int[] shape)
and
strScatter(type[] dest,
int dstOff,
int rank,
int exts,
int srs,
int[] shape)
A multi-strided region is characterized a rank, or
dimensionality, which we will call r. The detailed shape of
the region is represented by a vector of r extents or
sizes, which we will call
n1,
n2, ...,
nr,
and a vector of r strides, which we will call
s1,
s2, ...,
sr.
In the one dimensional case (r = 1), for example, a
strGather()
operation copies values of the elements:
source[srcOff], source[srcOff + s1], ..., source[srcOff + (n1 - 1)s1],
to the buffer, in the order shown.
Conversely a rank-1
strScatter()
operation reads n1
values from the buffer and writes them to the elements:
dest[dstOff], dest[dstOff + s1], ..., dest[dstOff + (n1 - 1)s1],
In the two dimensional case, a
strGather()
operation copies values of the elements:
source[srcOff], source[srcOff + s2], ..., source[srcOff + (n2 - 1)s2],
source[srcOff + s1], source[srcOff + s1 + s2], ..., source[srcOff + s1 + (n2 - 1)s2],
...,
source[srcOff + (n1 - 1)s1], source[srcOff + (n1 - 1)s1 + s2], ..., source[srcOff + (n1 - 1)s1 + (n2 - 1)s2]
to the buffer, in the order shown.
A rank-2
strScatter()
operation reads
n1 n2
values from the buffer and writes them to the elements:
dest[dstOff], dest[dstOff + s2], ..., dest[dstOff + (n2 - 1)s2],
dest[dstOff + s1], dest[dstOff + s1 + s2], ..., dest[dstOff + s1 + (n2 - 1)s2],
...,
dest[dstOff + (n1 - 1)s1], dest[dstOff + (n1 - 1)s1 + s2], ..., dest[dstOff + (n1 - 1)s1 + (n2 - 1)s2]
This pattern generalizes to any rank.
In the concrete parameters lists, the sizes
n1,
n2, ...,
nr are given by the shape
elements:
shape[exts], shape[exts + 1], ..., shape[exts + rank - 1]
and the strides
s1,
s2, ...,
sr are given by the shape
elements:
shape[strs], shape[strs + 1], ..., shape[strs + rank - 1]
commit()
method "freezes" the buffer,
putting it in a readable state, and moves the read pointer to
the start of the buffer. Now read operations can begin; but
write operations are no longer allowed.
After the data has been read, you may want to put the buffer back
into a writable state, ready for more data. To do this use the
clear()
method. This erases the original data, and moves
the write pointer to the start of the buffer.
If on the other hand you need to re-read the same buffer contents from
the beginning, the commit()
method can be called
again to rewind the read pointer back to the start of the buffer,
without changing contents.
getRemaining()
or
getSectionSize()
will generally reflect how much data was transferred before
the exception occurred. But even this behavior cannot be guaranteed
in the case of OBJECT
sections,
where an individual object may be incompletely transferred.
Field Summary | |
---|---|
static int |
ALIGNMENT_UNIT
|
static int |
SECTION_OVERHEAD
|
Constructor Summary | |
---|---|
protected |
Buffer()
Default constructor |
|
Buffer(int capacity)
Creates a buffer with specified static capacity, and static buffer encoding given by java.nio.ByteOrder.nativeEncoding(). |
|
Buffer(RawBuffer buffer,
int bufoffset,
int capacity)
Creates a buffer with specified rawbuffer, and staring at the offset specified. |
Method Summary | |
---|---|
void |
clear()
Empty the buffer and put it in a writeable state. |
void |
commit()
Freeze buffer, putting it into a readable state, and setting the read pointer to the start of the buffer. |
void |
copy(java.nio.ByteBuffer srcStaticBuffer,
int srcOffset,
int staticBufferLength,
int dstOffset,
byte[] srcDynamicBuffer,
int dynamicBufferLength)
|
void |
free()
Free resources associated with this buffer. |
void |
gather(boolean[] source,
int numEls,
int idxOff,
int[] indexes)
Append numEls selected boolean elements from array source to the current section of buffer. |
void |
gather(byte[] source,
int numEls,
int idxOff,
int[] indexes)
Append numEls selected byte elements from array source to the current section of buffer. |
void |
gather(char[] source,
int numEls,
int idxOff,
int[] indexes)
Append numEls selected char elements from array source to the current section of buffer. |
void |
gather(double[] source,
int numEls,
int idxOff,
int[] indexes)
Append numEls selected double elements from array source to the current section of buffer. |
void |
gather(float[] source,
int numEls,
int idxOff,
int[] indexes)
Append numEls selected float elements from array source to the current section of buffer. |
void |
gather(int[] source,
int numEls,
int idxOff,
int[] indexes)
Append numEls selected int elements from array source to the current section of buffer. |
void |
gather(long[] source,
int numEls,
int idxOff,
int[] indexes)
Append numEls selected long elements from array source to the current section of buffer. |
void |
gather(java.lang.Object[] source,
int numEls,
int idxOff,
int[] indexes)
Append numEls selected Object elements from array source to the current section of buffer. |
void |
gather(short[] source,
int numEls,
int idxOff,
int[] indexes)
Append numEls selected short elements from array source to the current section of buffer. |
byte[] |
getDynamicBuffer()
Get bytes of the dynamic buffer. |
java.nio.ByteOrder |
getEncoding()
Returns encoding of numeric data in the static buffer. |
int |
getRemaining()
Returns number of elements remaining to be read in the current section. |
Type |
getSectionHeader()
Read a section header from the buffer, and make this the current section. |
int |
getSectionSize()
Size of current section. |
int |
getSize()
Get total number of bytes of data currently in the static buffer. |
RawBuffer |
getStaticBuffer()
Returns a representation of the static buffer. |
boolean |
isWritable()
Determine read-write mode of buffer. |
int |
offset()
|
void |
putSectionHeader(Type type)
Start a new section in the buffer: write a section header to the buffer and make the new section the current section. |
void |
read(boolean[] dest,
int dstOff,
int numEls)
Read the next numEls boolean items from the current section of the buffer, and write them to consecutive elements of the array dest, starting at index dstOff. |
void |
read(byte[] dest,
int dstOff,
int numEls)
Read the next numEls byte items from the current section of the buffer, and write them to consecutive elements of the array dest, starting at index dstOff. |
void |
read(char[] dest,
int dstOff,
int numEls)
Read the next numEls char items from the current section of the buffer, and write them to consecutive elements of the array dest, starting at index dstOff. |
void |
read(double[] dest,
int dstOff,
int numEls)
Read the next numEls double items from the current section of the buffer, and write them to consecutive elements of the array dest, starting at index dstOff. |
void |
read(float[] dest,
int dstOff,
int numEls)
Read the next numEls float items from the current section of the buffer, and write them to consecutive elements of the array dest, starting at index dstOff. |
void |
read(int[] dest,
int dstOff,
int numEls)
Read the next numEls int items from the current section of the buffer, and write them to consecutive elements of the array dest, starting at index dstOff. |
void |
read(long[] dest,
int dstOff,
int numEls)
Read the next numEls long items from the current section of the buffer, and write them to consecutive elements of the array dest, starting at index dstOff. |
void |
read(java.lang.Object[] dest,
int dstOff,
int numEls)
Read the next numEls Object items from the current section of the buffer, and write them to consecutive elements of the array dest, starting at index dstOff. |
void |
read(short[] dest,
int dstOff,
int numEls)
Read the next numEls short items from the current section of the buffer, and write them to consecutive elements of the array dest, starting at index dstOff. |
void |
scatter(boolean[] dest,
int numEls,
int idxOff,
int[] indexes)
Read the next numEls boolean items from the current section of the buffer, and write them to selected elements of the array dest. |
void |
scatter(byte[] dest,
int numEls,
int idxOff,
int[] indexes)
Read the next numEls byte items from the current section of the buffer, and write them to selected elements of the array dest. |
void |
scatter(char[] dest,
int numEls,
int idxOff,
int[] indexes)
Read the next numEls char items from the current section of the buffer, and write them to selected elements of the array dest. |
void |
scatter(double[] dest,
int numEls,
int idxOff,
int[] indexes)
Read the next numEls double items from the current section of the buffer, and write them to selected elements of the array dest. |
void |
scatter(float[] dest,
int numEls,
int idxOff,
int[] indexes)
Read the next numEls float items from the current section of the buffer, and write them to selected elements of the array dest. |
void |
scatter(int[] dest,
int numEls,
int idxOff,
int[] indexes)
Read the next numEls int items from the current section of the buffer, and write them to selected elements of the array dest. |
void |
scatter(long[] dest,
int numEls,
int idxOff,
int[] indexes)
Read the next numEls long items from the current section of the buffer, and write them to selected elements of the array dest. |
void |
scatter(java.lang.Object[] dest,
int numEls,
int idxOff,
int[] indexes)
Read the next numEls Object items from the current section of the buffer, and write them to selected elements of the array dest. |
void |
scatter(short[] dest,
int numEls,
int idxOff,
int[] indexes)
Read the next numEls short items from the current section of the buffer, and write them to selected elements of the array dest. |
void |
setDynamicBuffer(byte[] dynamicBuffer)
Set bytes of the dynamic buffer. |
void |
setEncoding(java.nio.ByteOrder encoding)
Set encoding of numeric data in the static buffer. |
void |
setSize(int size)
Set total number of bytes of data currently in the static buffer. |
void |
setStaticBuffer(RawBuffer staticBuffer)
Set representation of the static buffer. |
void |
strGather(boolean[] source,
int srcOff,
int rank,
int exts,
int strs,
int[] shape)
Append selected boolean elements from a multistrided region of array source to the current section of buffer. |
void |
strGather(byte[] source,
int srcOff,
int rank,
int exts,
int strs,
int[] shape)
Append selected byte elements from a multistrided region of array source to the current section of buffer. |
void |
strGather(char[] source,
int srcOff,
int rank,
int exts,
int strs,
int[] shape)
Append selected char elements from a multistrided region of array source to the current section of buffer. |
void |
strGather(double[] source,
int srcOff,
int rank,
int exts,
int strs,
int[] shape)
Append selected double elements from a multistrided region of array source to the current section of buffer. |
void |
strGather(float[] source,
int srcOff,
int rank,
int exts,
int strs,
int[] shape)
Append selected float elements from a multistrided region of array source to the current section of buffer. |
void |
strGather(int[] source,
int srcOff,
int rank,
int exts,
int strs,
int[] shape)
Append selected int elements from a multistrided region of array source to the current section of buffer. |
void |
strGather(long[] source,
int srcOff,
int rank,
int exts,
int strs,
int[] shape)
Append selected long elements from a multistrided region of array source to the current section of buffer. |
void |
strGather(java.lang.Object[] source,
int srcOff,
int rank,
int exts,
int strs,
int[] shape)
Append selected boolean elements from a multistrided region of array source to the current section of buffer. |
void |
strGather(short[] source,
int srcOff,
int rank,
int exts,
int strs,
int[] shape)
Append selected short elements from a multistrided region of array source to the current section of buffer. |
void |
strScatter(boolean[] dest,
int dstOff,
int rank,
int exts,
int strs,
int[] shape)
Read boolean items from the current section of the buffer, and write them to a multistrided region of the array dest. |
void |
strScatter(byte[] dest,
int dstOff,
int rank,
int exts,
int strs,
int[] shape)
Read byte items from the current section of the buffer, and write them to a multistrided region of the array dest. |
void |
strScatter(char[] dest,
int dstOff,
int rank,
int exts,
int strs,
int[] shape)
Read char items from the current section of the buffer, and write them to a multistrided region of the array dest. |
void |
strScatter(double[] dest,
int dstOff,
int rank,
int exts,
int strs,
int[] shape)
Read double items from the current section of the buffer, and write them to a multistrided region of the array dest. |
void |
strScatter(float[] dest,
int dstOff,
int rank,
int exts,
int strs,
int[] shape)
Read float items from the current section of the buffer, and write them to a multistrided region of the array dest. |
void |
strScatter(int[] dest,
int dstOff,
int rank,
int exts,
int strs,
int[] shape)
Read int items from the current section of the buffer, and write them to a multistrided region of the array dest. |
void |
strScatter(long[] dest,
int dstOff,
int rank,
int exts,
int strs,
int[] shape)
Read long items from the current section of the buffer, and write them to a multistrided region of the array dest. |
void |
strScatter(java.lang.Object[] dest,
int dstOff,
int rank,
int exts,
int strs,
int[] shape)
Read Object items from the current section of the buffer, and write them to a multistrided region of the array dest. |
void |
strScatter(short[] dest,
int dstOff,
int rank,
int exts,
int strs,
int[] shape)
Read short items from the current section of the buffer, and write them to a multistrided region of the array dest. |
void |
write(boolean[] source,
int srcOff,
int numEls)
Append numEls consecutive boolean elements from array source, starting at index srcOff, to the current section of buffer. |
void |
write(byte[] source,
int srcOff,
int numEls)
Append numEls consecutive byte elements from array source, starting at index srcOff, to the current section of buffer. |
void |
write(char[] source,
int srcOff,
int numEls)
Append numEls consecutive char elements from array source, starting at index srcOff, to the current section of buffer. |
void |
write(double[] source,
int srcOff,
int numEls)
Append numEls consecutive double elements from array source, starting at index srcOff, to the current section of buffer. |
void |
write(float[] source,
int srcOff,
int numEls)
Append numEls consecutive float elements from array source, starting at index srcOff, to the current section of buffer. |
void |
write(int[] source,
int srcOff,
int numEls)
Append numEls consecutive int elements from array source, starting at index srcOff, to the current section of buffer. |
void |
write(long[] source,
int srcOff,
int numEls)
Append numEls consecutive long elements from array source, starting at index srcOff, to the current section of buffer. |
void |
write(java.lang.Object[] source,
int srcOff,
int numEls)
Append numEls consecutive Object elements from array source, starting at index srcOff, to the current section of buffer. |
void |
write(short[] source,
int srcOff,
int numEls)
Append numEls consecutive short elements from array source, starting at index srcOff, to the current section of buffer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int SECTION_OVERHEAD
public static final int ALIGNMENT_UNIT
Constructor Detail |
---|
protected Buffer()
public Buffer(int capacity)
capacity
- the capacity of the static buffer, in bytes.public Buffer(RawBuffer buffer, int bufoffset, int capacity)
Method Detail |
---|
public int offset()
public void copy(java.nio.ByteBuffer srcStaticBuffer, int srcOffset, int staticBufferLength, int dstOffset, byte[] srcDynamicBuffer, int dynamicBufferLength)
public void free()
finalize()
, none of which have any effect
after the first invocation.
public void commit() throws BufferException
DynamicBufferException
- if there are unforseen problems
saving the state of the dynamic buffer.
WrongStateException
- if buffer has already been freed.
BufferException
public void clear() throws BufferException
WrongStateException
- if buffer has already been freed.
BufferException
public void putSectionHeader(Type type) throws BufferException
SECTION_OVERHEAD
bytes of static buffer capacity.
Any preceding section will be padded with the minimum
number of bytes necessary to ensure that the new section starts on
a boundary that is a multiple of
ALIGNMENT_UNIT
bytes.
This may require up to ALIGNMENT_UNIT - 1 bytes of
additional buffer capacity.
type
- the type of this section. One of
BYTE
,
CHAR
,
SHORT
,
BOOLEAN
,
INT
,
LONG
,
FLOAT
, or
DOUBLE
, if this is a static section, or one of
OBJECT
,
BYTE_DYNAMIC
,
CHAR_DYNAMIC
,
SHORT_DYNAMIC
,
BOOLEAN_DYNAMIC
,
INT_DYNAMIC
,
LONG_DYNAMIC
,
FLOAT_DYNAMIC
, or
DOUBLE_DYNAMIC
if this is a dynamic section.
WrongStateException
- if buffer is not in a writeable state,
or buffer has already been freed.
BufferOverflowException
- if there is insufficient space
left in the static buffer.
BufferException
public Type getSectionHeader() throws BufferException
BYTE
,
CHAR
,
SHORT
,
BOOLEAN
,
INT
,
LONG
,
FLOAT
,
DOUBLE
,
OBJECT
,
BYTE_DYNAMIC
,
CHAR_DYNAMIC
,
SHORT_DYNAMIC
,
BOOLEAN_DYNAMIC
,
INT_DYNAMIC
,
LONG_DYNAMIC
,
FLOAT_DYNAMIC
, or
DOUBLE_DYNAMIC
.
WrongStateException
- if buffer is not in a readable state,
or buffer has already been freed.
TypeMismatchException
- if the value of the type
parameter does not precisely match the value specified when the
section was originally created by putSectionHeader()
.
SectionSizeMismatchException
- if there are elements remaining
to be read in the previous section.
BufferUnderflowException
- if there there are no more
sections remaining to be read in the buffer.
BufferException
public int getSectionSize() throws BufferException
WrongStateException
- if current section is undefined,
or buffer has already been freed.
BufferException
public int getRemaining() throws BufferException
WrongStateException
- if buffer is not in a readable state,
or buffer has already been freed.
BufferException
public void write(byte[] source, int srcOff, int numEls) throws BufferException
source
- the byte array from which data is taken.srcOff
- the subscript of the first element in the
source array that is to be copied.numEls
- the total number of elements to be copied from
source
TypeMismatchException
- if the current section was not
created with type BYTE
or
BYTE_DYNAMIC
.
BufferOverflowException
- if there is insufficient space
left in the static buffer.
WrongStateException
- if buffer is not in a writeable state,
or the current section is undefined, or the buffer has already been
freed.
java.lang.ArrayIndexOutOfBoundsException
- if the specified
combination of srcOff and numEls would imply
access to elements outside the bounds of source.
DynamicBufferException
- if there are unforseen problems
writing to the dynamic buffer.
BufferException
public void write(short[] source, int srcOff, int numEls) throws BufferException
source
- the short array from which data is taken.srcOff
- the subscript of the first element in the
source array that is to be copied.numEls
- the total number of elements to be copied from
source
TypeMismatchException
- if the current section was not
created with type SHORT
or
SHORT_DYNAMIC
.
BufferOverflowException
- if there is insufficient space
left in the static buffer.
WrongStateException
- if buffer is not in a writeable state,
or the current section is undefined, or the buffer has already been
freed.
java.lang.ArrayIndexOutOfBoundsException
- if the specified
combination of srcOff and numEls would imply
access to elements outside the bounds of source.
DynamicBufferException
- if there are unforseen problems
writing to the dynamic buffer.
BufferException
public void write(int[] source, int srcOff, int numEls) throws BufferException
source
- the int array from which data is taken.srcOff
- the subscript of the first element in the
source array that is to be copied.numEls
- the total number of elements to be copied from
source
TypeMismatchException
- if the current section was not
created with type INT
or
INT_DYNAMIC
.
BufferOverflowException
- if there is insufficient space
left in the static buffer.
WrongStateException
- if buffer is not in a writeable state,
or the current section is undefined, or the buffer has already been
freed.
java.lang.ArrayIndexOutOfBoundsException
- if the specified
combination of srcOff and numEls would imply
access to elements outside the bounds of source.
DynamicBufferException
- if there are unforseen problems
writing to the dynamic buffer.
BufferException
public void write(long[] source, int srcOff, int numEls) throws BufferException
source
- the long array from which data is taken.srcOff
- the subscript of the first element in the
source array that is to be copied.numEls
- the total number of elements to be copied from
source
TypeMismatchException
- if the current section was not
created with type LONG
or
LONG_DYNAMIC
.
BufferOverflowException
- if there is insufficient space
left in the static buffer.
WrongStateException
- if buffer is not in a writeable state,
or the current section is undefined, or the buffer has already been
freed.
java.lang.ArrayIndexOutOfBoundsException
- if the specified
combination of srcOff and numEls would imply
access to elements outside the bounds of source.
DynamicBufferException
- if there are unforseen problems
writing to the dynamic buffer.
BufferException
public void write(char[] source, int srcOff, int numEls) throws BufferException
source
- the char array from which data is taken.srcOff
- the subscript of the first element in the
source array that is to be copied.numEls
- the total number of elements to be copied from
source
TypeMismatchException
- if the current section was not
created with type CHAR
or
CHAR_DYNAMIC
.
BufferOverflowException
- if there is insufficient space
left in the static buffer.
WrongStateException
- if buffer is not in a writeable state,
or the current section is undefined, or the buffer has already been
freed.
java.lang.ArrayIndexOutOfBoundsException
- if the specified
combination of srcOff and numEls would imply
access to elements outside the bounds of source.
DynamicBufferException
- if there are unforseen problems
writing to the dynamic buffer.
BufferException
public void write(float[] source, int srcOff, int numEls) throws BufferException
source
- the float array from which data is taken.srcOff
- the subscript of the first element in the
source array that is to be copied.numEls
- the total number of elements to be copied from
source
TypeMismatchException
- if the current section was not
created with type FLOAT
or
FLOAT_DYNAMIC
.
BufferOverflowException
- if there is insufficient space
left in the static buffer.
WrongStateException
- if buffer is not in a writeable state,
or the current section is undefined, or the buffer has already been
freed.
java.lang.ArrayIndexOutOfBoundsException
- if the specified
combination of srcOff and numEls would imply
access to elements outside the bounds of source.
DynamicBufferException
- if there are unforseen problems
writing to the dynamic buffer.
BufferException
public void write(double[] source, int srcOff, int numEls) throws BufferException
source
- the double array from which data is taken.srcOff
- the subscript of the first element in the
source array that is to be copied.numEls
- the total number of elements to be copied from
source
TypeMismatchException
- if the current section was not
created with type DOUBLE
or
DOUBLE_DYNAMIC
.
BufferOverflowException
- if there is insufficient space
left in the static buffer.
WrongStateException
- if buffer is not in a writeable state,
or the current section is undefined, or the buffer has already been
freed.
java.lang.ArrayIndexOutOfBoundsException
- if the specified
combination of srcOff and numEls would imply
access to elements outside the bounds of source.
DynamicBufferException
- if there are unforseen problems
writing to the dynamic buffer.
BufferException
public void write(boolean[] source, int srcOff, int numEls) throws BufferException
source
- the boolean array from which data is taken.srcOff
- the subscript of the first element in the
source array that is to be copied.numEls
- the total number of elements to be copied from
source
TypeMismatchException
- if the current section was not
created with type BOOLEAN
or
BOOLEAN_DYNAMIC
.
BufferOverflowException
- if there is insufficient space
left in the static buffer.
WrongStateException
- if buffer is not in a writeable state,
or the current section is undefined, or the buffer has already been
freed.
java.lang.ArrayIndexOutOfBoundsException
- if the specified
combination of srcOff and numEls would imply
access to elements outside the bounds of source.
DynamicBufferException
- if there are unforseen problems
writing to the dynamic buffer.
BufferException
public void write(java.lang.Object[] source, int srcOff, int numEls) throws BufferException
source
- the Object array from which data is taken.srcOff
- the subscript of the first element in the
source array that is to be copied.numEls
- the total number of elements to be copied from
source
TypeMismatchException
- if the current section was not
created with type OBJECT
.
WrongStateException
- if buffer is not in a writeable state,
or the current section is undefined, or the buffer has already been
freed.
java.lang.ArrayIndexOutOfBoundsException
- if the specified
combination of srcOff and numEls would imply
access to elements outside the bounds of source.
DynamicBufferException
- if there are unforseen problems
writing to the dynamic buffer.
BufferException
public void gather(byte[] source, int numEls, int idxOff, int[] indexes) throws BufferException
class description
for further details.
If the current section of the buffer
is a static section this requires 1 * numEls
units of static buffer capacity.
source
- the byte array from which data is taken.idxOff
- the subscript of the first element in the array
indexes to be used as an index into source.numEls
- the total number of elements to be copied from
sourceindexes
- an int array containing subscripts into
source.
TypeMismatchException
- if the current section was not
created with type BYTE
or
BYTE_DYNAMIC
.
BufferOverflowException
- if there is insufficient space
left in the static buffer.
WrongStateException
- if buffer is not in a writeable state,
or the current section is undefined, or the buffer has already been
freed.
java.lang.ArrayIndexOutOfBoundsException
- if the specified
combination of idxOff and numEls would imply
access to elements outside the bounds of indexes,
or if a selected element of indexes requires access
to an element outside the bounds of source.
DynamicBufferException
- if there are unforseen problems
writing to the dynamic buffer.
BufferException
public void gather(short[] source, int numEls, int idxOff, int[] indexes) throws BufferException
class description
for further details.
If the current section of the buffer
is a static section this requires 2 * numEls
units of static buffer capacity.
source
- the short array from which data is taken.idxOff
- the subscript of the first element in the array
indexes to be used as an index into source.numEls
- the total number of elements to be copied from
sourceindexes
- an int array containing subscripts into
source.
TypeMismatchException
- if the current section was not
created with type SHORT
or
SHORT_DYNAMIC
.
BufferOverflowException
- if there is insufficient space
left in the static buffer.
WrongStateException
- if buffer is not in a writeable state,
or the current section is undefined, or the buffer has already been
freed.
java.lang.ArrayIndexOutOfBoundsException
- if the specified
combination of idxOff and numEls would imply
access to elements outside the bounds of indexes,
or if a selected element of indexes requires access
to an element outside the bounds of source.
DynamicBufferException
- if there are unforseen problems
writing to the dynamic buffer.
BufferException
public void gather(int[] source, int numEls, int idxOff, int[] indexes) throws BufferException
class description
for further details.
If the current section of the buffer
is a static section this requires 4 * numEls
units of static buffer capacity.
source
- the int array from which data is taken.idxOff
- the subscript of the first element in the array
indexes to be used as an index into source.numEls
- the total number of elements to be copied from
sourceindexes
- an int array containing subscripts into
source.
TypeMismatchException
- if the current section was not
created with type INT
or
INT_DYNAMIC
.
BufferOverflowException
- if there is insufficient space
left in the static buffer.
WrongStateException
- if buffer is not in a writeable state,
or the current section is undefined, or the buffer has already been
freed.
java.lang.ArrayIndexOutOfBoundsException
- if the specified
combination of idxOff and numEls would imply
access to elements outside the bounds of indexes,
or if a selected element of indexes requires access
to an element outside the bounds of source.
DynamicBufferException
- if there are unforseen problems
writing to the dynamic buffer.
BufferException
public void gather(long[] source, int numEls, int idxOff, int[] indexes) throws BufferException
class description
for further details.
If the current section of the buffer
is a static section this requires 8 * numEls
units of static buffer capacity.
source
- the long array from which data is taken.idxOff
- the subscript of the first element in the array
indexes to be used as an index into source.numEls
- the total number of elements to be copied from
sourceindexes
- an int array containing subscripts into
source.
TypeMismatchException
- if the current section was not
created with type LONG
or
LONG_DYNAMIC
.
BufferOverflowException
- if there is insufficient space
left in the static buffer.
WrongStateException
- if buffer is not in a writeable state,
or the current section is undefined, or the buffer has already been
freed.
java.lang.ArrayIndexOutOfBoundsException
- if the specified
combination of idxOff and numEls would imply
access to elements outside the bounds of indexes,
or if a selected element of indexes requires access
to an element outside the bounds of source.
DynamicBufferException
- if there are unforseen problems
writing to the dynamic buffer.
BufferException
public void gather(char[] source, int numEls, int idxOff, int[] indexes) throws BufferException
class description
for further details.
If the current section of the buffer
is a static section this requires 2 * numEls
units of static buffer capacity.
source
- the char array from which data is taken.idxOff
- the subscript of the first element in the array
indexes to be used as an index into source.numEls
- the total number of elements to be copied from
sourceindexes
- an int array containing subscripts into
source.
TypeMismatchException
- if the current section was not
created with type CHAR
or
CHAR_DYNAMIC
.
BufferOverflowException
- if there is insufficient space
left in the static buffer.
WrongStateException
- if buffer is not in a writeable state,
or the current section is undefined, or the buffer has already been
freed.
java.lang.ArrayIndexOutOfBoundsException
- if the specified
combination of idxOff and numEls would imply
access to elements outside the bounds of indexes,
or if a selected element of indexes requires access
to an element outside the bounds of source.
DynamicBufferException
- if there are unforseen problems
writing to the dynamic buffer.
BufferException
public void gather(float[] source, int numEls, int idxOff, int[] indexes) throws BufferException
class description
for further details.
If the current section of the buffer
is a static section this requires 4 * numEls
units of static buffer capacity.
source
- the float array from which data is taken.idxOff
- the subscript of the first element in the array
indexes to be used as an index into source.numEls
- the total number of elements to be copied from
sourceindexes
- an int array containing subscripts into
source.
TypeMismatchException
- if the current section was not
created with type FLOAT
or
FLOAT_DYNAMIC
.
BufferOverflowException
- if there is insufficient space
left in the static buffer.
WrongStateException
- if buffer is not in a writeable state,
or the current section is undefined, or the buffer has already been
freed.
java.lang.ArrayIndexOutOfBoundsException
- if the specified
combination of idxOff and numEls would imply
access to elements outside the bounds of indexes,
or if a selected element of indexes requires access
to an element outside the bounds of source.
DynamicBufferException
- if there are unforseen problems
writing to the dynamic buffer.
BufferException
public void gather(double[] source, int numEls, int idxOff, int[] indexes) throws BufferException
class description
for further details.
If the current section of the buffer
is a static section this requires 8 * numEls
units of static buffer capacity.
source
- the double array from which data is taken.idxOff
- the subscript of the first element in the array
indexes to be used as an index into source.numEls
- the total number of elements to be copied from
sourceindexes
- an int array containing subscripts into
source.
TypeMismatchException
- if the current section was not
created with type DOUBLE
or
DOUBLE_DYNAMIC
.
BufferOverflowException
- if there is insufficient space
left in the static buffer.
WrongStateException
- if buffer is not in a writeable state,
or the current section is undefined, or the buffer has already been
freed.
java.lang.ArrayIndexOutOfBoundsException
- if the specified
combination of idxOff and numEls would imply
access to elements outside the bounds of indexes,
or if a selected element of indexes requires access
to an element outside the bounds of source.
DynamicBufferException
- if there are unforseen problems
writing to the dynamic buffer.
BufferException
public void gather(boolean[] source, int numEls, int idxOff, int[] indexes) throws BufferException
class description
for further details.
If the current section of the buffer
is a static section this requires 1 * numEls
units of static buffer capacity.
source
- the boolean array from which data is taken.idxOff
- the subscript of the first element in the array
indexes to be used as an index into source.numEls
- the total number of elements to be copied from
sourceindexes
- an int array containing subscripts into
source.
TypeMismatchException
- if the current section was not
created with type BOOLEAN
or
BOOLEAN_DYNAMIC
.
BufferOverflowException
- if there is insufficient space
left in the static buffer.
WrongStateException
- if buffer is not in a writeable state,
or the current section is undefined, or the buffer has already been
freed.
java.lang.ArrayIndexOutOfBoundsException
- if the specified
combination of idxOff and numEls would imply
access to elements outside the bounds of indexes,
or if a selected element of indexes requires access
to an element outside the bounds of source.
DynamicBufferException
- if there are unforseen problems
writing to the dynamic buffer.
BufferException
public void gather(java.lang.Object[] source, int numEls, int idxOff, int[] indexes) throws BufferException
class description
for further details.
source
- the Object array from which data is taken.numEls
- the total number of elements to be copied from
sourceidxOff
- the subscript of the first element in the array
indexes to be used as an index into source.indexes
- an int array containing subscripts into
source.
TypeMismatchException
- if the current section was not
created with type OBJECT
.
WrongStateException
- if buffer is not in a writeable state,
or the current section is undefined, or the buffer has already been
freed.
java.lang.ArrayIndexOutOfBoundsException
- if the specified
combination of idxOff and numEls would imply
access to elements outside the bounds of indexes,
or if a selected element of indexes requires access
to an element outside the bounds of source.
DynamicBufferException
- if there are unforseen problems
writing to the dynamic buffer.
BufferException
public void strGather(byte[] source, int srcOff, int rank, int exts, int strs, int[] shape) throws BufferException
class description
for details.
If the current section of the buffer
is a static section this requires 1 * volume
units of static buffer capacity, where volume
is the product of the extents of the specified region.
source
- the byte array from which data is taken.srcOff
- the subscript of the first element in the
source array that is to be copied.rank
- the rank or dimensionality of the region to
be copied from sourceexts
- the offset in the shape array of
the first of rank extents.strs
- the offset in the shape array of
the first of rank strides.shape
- an int array holding extent and stride information
for the region to be copied from source.
TypeMismatchException
- if the current section was not
created with type BYTE
or
BYTE_DYNAMIC
.
BufferOverflowException
- if there is insufficient space
left in the static buffer.
WrongStateException
- if buffer is not in a writeable state,
or the current section is undefined, or the buffer has already been
freed.
IllegalArgumentException
- if the specified rank is negative.
java.lang.ArrayIndexOutOfBoundsException
- if the values of rank
and exts and strs would imply
access to elements outside the bounds of shape, or
if the region defined by the resulting extents and strides would
imply access to elements outside the bounds of source.
DynamicBufferException
- if there are unforseen problems
writing to the dynamic buffer.
BufferException
public void strGather(short[] source, int srcOff, int rank, int exts, int strs, int[] shape) throws BufferException
class description
for details.
If the current section of the buffer
is a static section this requires 2 * volume
units of static buffer capacity, where volume
is the product of the extents of the specified region.
source
- the short array from which data is taken.srcOff
- the subscript of the first element in the
source array that is to be copied.rank
- the rank or dimensionality of the region to
be copied from sourceexts
- the offset in the shape array of
the first of rank extents.strs
- the offset in the shape array of
the first of rank strides.shape
- an int array holding extent and stride information
for the region to be copied from source.
TypeMismatchException
- if the current section was not
created with type SHORT
or
SHORT_DYNAMIC
.
BufferOverflowException
- if there is insufficient space
left in the static buffer.
WrongStateException
- if buffer is not in a writeable state,
or the current section is undefined, or the buffer has already been
freed.
IllegalArgumentException
- if the specified rank is negative.
java.lang.ArrayIndexOutOfBoundsException
- if the values of rank
and exts and strs would imply
access to elements outside the bounds of shape, or
if the region defined by the resulting extents and strides would
imply access to elements outside the bounds of source.
DynamicBufferException
- if there are unforseen problems
writing to the dynamic buffer.
BufferException
public void strGather(int[] source, int srcOff, int rank, int exts, int strs, int[] shape) throws BufferException
class description
for details.
If the current section of the buffer
is a static section this requires 4 * volume
units of static buffer capacity, where volume
is the product of the extents of the specified region.
source
- the int array from which data is taken.srcOff
- the subscript of the first element in the
source array that is to be copied.rank
- the rank or dimensionality of the region to
be copied from sourceexts
- the offset in the shape array of
the first of rank extents.strs
- the offset in the shape array of
the first of rank strides.shape
- an int array holding extent and stride information
for the region to be copied from source.
TypeMismatchException
- if the current section was not
created with type INT
or
INT_DYNAMIC
.
BufferOverflowException
- if there is insufficient space
left in the static buffer.
WrongStateException
- if buffer is not in a writeable state,
or the current section is undefined, or the buffer has already been
freed.
IllegalArgumentException
- if the specified rank is negative.
java.lang.ArrayIndexOutOfBoundsException
- if the values of rank
and exts and strs would imply
access to elements outside the bounds of shape, or
if the region defined by the resulting extents and strides would
imply access to elements outside the bounds of source.
DynamicBufferException
- if there are unforseen problems
writing to the dynamic buffer.
BufferException
public void strGather(long[] source, int srcOff, int rank, int exts, int strs, int[] shape) throws BufferException
class description
for details.
If the current section of the buffer
is a static section this requires 8 * volume
units of static buffer capacity, where volume
is the product of the extents of the specified region.
source
- the long array from which data is taken.srcOff
- the subscript of the first element in the
source array that is to be copied.rank
- the rank or dimensionality of the region to
be copied from sourceexts
- the offset in the shape array of
the first of rank extents.strs
- the offset in the shape array of
the first of rank strides.shape
- an int array holding extent and stride information
for the region to be copied from source.
TypeMismatchException
- if the current section was not
created with type LONG
or
LONG_DYNAMIC
.
BufferOverflowException
- if there is insufficient space
left in the static buffer.
WrongStateException
- if buffer is not in a writeable state,
or the current section is undefined, or the buffer has already been
freed.
IllegalArgumentException
- if the specified rank is negative.
java.lang.ArrayIndexOutOfBoundsException
- if the values of rank
and exts and strs would imply
access to elements outside the bounds of shape, or
if the region defined by the resulting extents and strides would
imply access to elements outside the bounds of source.
DynamicBufferException
- if there are unforseen problems
writing to the dynamic buffer.
BufferException
public void strGather(char[] source, int srcOff, int rank, int exts, int strs, int[] shape) throws BufferException
class description
for details.
If the current section of the buffer
is a static section this requires 2 * volume
units of static buffer capacity, where volume
is the product of the extents of the specified region.
source
- the char array from which data is taken.srcOff
- the subscript of the first element in the
source array that is to be copied.rank
- the rank or dimensionality of the region to
be copied from sourceexts
- the offset in the shape array of
the first of rank extents.strs
- the offset in the shape array of
the first of rank strides.shape
- an int array holding extent and stride information
for the region to be copied from source.
TypeMismatchException
- if the current section was not
created with type CHAR
or
CHAR_DYNAMIC
.
BufferOverflowException
- if there is insufficient space
left in the static buffer.
WrongStateException
- if buffer is not in a writeable state,
or the current section is undefined, or the buffer has already been
freed.
IllegalArgumentException
- if the specified rank is negative.
java.lang.ArrayIndexOutOfBoundsException
- if the values of rank
and exts and strs would imply
access to elements outside the bounds of shape, or
if the region defined by the resulting extents and strides would
imply access to elements outside the bounds of source.
DynamicBufferException
- if there are unforseen problems
writing to the dynamic buffer.
BufferException
public void strGather(float[] source, int srcOff, int rank, int exts, int strs, int[] shape) throws BufferException
class description
for details.
If the current section of the buffer
is a static section this requires 4 * volume
units of static buffer capacity, where volume
is the product of the extents of the specified region.
source
- the float array from which data is taken.srcOff
- the subscript of the first element in the
source array that is to be copied.rank
- the rank or dimensionality of the region to
be copied from sourceexts
- the offset in the shape array of
the first of rank extents.strs
- the offset in the shape array of
the first of rank strides.shape
- an int array holding extent and stride information
for the region to be copied from source.
TypeMismatchException
- if the current section was not
created with type FLOAT
or
FLOAT_DYNAMIC
.
BufferOverflowException
- if there is insufficient space
left in the static buffer.
WrongStateException
- if buffer is not in a writeable state,
or the current section is undefined, or the buffer has already been
freed.
IllegalArgumentException
- if the specified rank is negative.
java.lang.ArrayIndexOutOfBoundsException
- if the values of rank
and exts and strs would imply
access to elements outside the bounds of shape, or
if the region defined by the resulting extents and strides would
imply access to elements outside the bounds of source.
DynamicBufferException
- if there are unforseen problems
writing to the dynamic buffer.
BufferException
public void strGather(double[] source, int srcOff, int rank, int exts, int strs, int[] shape) throws BufferException
class description
for details.
If the current section of the buffer
is a static section this requires 8 * volume
units of static buffer capacity, where volume
is the product of the extents of the specified region.
source
- the double array from which data is taken.srcOff
- the subscript of the first element in the
source array that is to be copied.rank
- the rank or dimensionality of the region to
be copied from sourceexts
- the offset in the shape array of
the first of rank extents.strs
- the offset in the shape array of
the first of rank strides.shape
- an int array holding extent and stride information
for the region to be copied from source.
TypeMismatchException
- if the current section was not
created with type DOUBLE
or
DOUBLE_DYNAMIC
.
BufferOverflowException
- if there is insufficient space
left in the static buffer.
WrongStateException
- if buffer is not in a writeable state,
or the current section is undefined, or the buffer has already been
freed.
IllegalArgumentException
- if the specified rank is negative.
java.lang.ArrayIndexOutOfBoundsException
- if the values of rank
and exts and strs would imply
access to elements outside the bounds of shape, or
if the region defined by the resulting extents and strides would
imply access to elements outside the bounds of source.
DynamicBufferException
- if there are unforseen problems
writing to the dynamic buffer.
BufferException
public void strGather(boolean[] source, int srcOff, int rank, int exts, int strs, int[] shape) throws BufferException
class description
for details.
If the current section of the buffer
is a static section this requires 1 * volume
units of static buffer capacity, where volume
is the product of the extents of the specified region.
source
- the boolean array from which data is taken.srcOff
- the subscript of the first element in the
source array that is to be copied.rank
- the rank or dimensionality of the region to
be copied from sourceexts
- the offset in the shape array of
the first of rank extents.strs
- the offset in the shape array of
the first of rank strides.shape
- an int array holding extent and stride information
for the region to be copied from source.
TypeMismatchException
- if the current section was not
created with type BOOLEAN
or
BOOLEAN_DYNAMIC
.
BufferOverflowException
- if there is insufficient space
left in the static buffer.
WrongStateException
- if buffer is not in a writeable state,
or the current section is undefined, or the buffer has already been
freed.
IllegalArgumentException
- if the specified rank is negative.
java.lang.ArrayIndexOutOfBoundsException
- if the values of rank
and exts and strs would imply
access to elements outside the bounds of shape, or
if the region defined by the resulting extents and strides would
imply access to elements outside the bounds of source.
DynamicBufferException
- if there are unforseen problems
writing to the dynamic buffer.
BufferException
public void strGather(java.lang.Object[] source, int srcOff, int rank, int exts, int strs, int[] shape) throws BufferException
class description
for details.
source
- the boolean array from which data is taken.srcOff
- the subscript of the first element in the
source array that is to be copied.rank
- the rank or dimensionality of the region to
be copied from sourceexts
- the offset in the shape array of
the first of rank extents.strs
- the offset in the shape array of
the first of rank strides.shape
- an int array holding extent and stride information
for the region to be copied from source.
TypeMismatchException
- if the current section was not
created with type OBJECT
.
WrongStateException
- if buffer is not in a writeable state,
or the current section is undefined, or the buffer has already been
freed.
IllegalArgumentException
- if the specified rank is negative.
java.lang.ArrayIndexOutOfBoundsException
- if the values of rank
and exts and strs would imply
access to elements outside the bounds of shape, or
if the region defined by the resulting extents and strides would
imply access to elements outside the bounds of source.
DynamicBufferException
- if there are unforseen problems
writing to the dynamic buffer.
BufferException
public void read(byte[] dest, int dstOff, int numEls) throws BufferException
dest
- the byte array to which data will be written.dstOff
- the subscript of the first element in the
dest array that will be overwritten.numEls
- the total number of items to be copied from
the buffer to elements of dest.
TypeMismatchException
- if the current section was not
created with type BYTE
or
BYTE_DYNAMIC
.
SectionSizeMismatchException
- if this operation
would imply reading past the end of the current section.
WrongStateException
- if buffer is not in a readable state,
or the current section is undefined, or the buffer has already been
freed.
java.lang.ArrayIndexOutOfBoundsException
- if the specified
combination of dstOff and numEls would imply
access to elements outside the bounds of dest.
DynamicBufferException
- if there are unforseen problems
reading the dynamic buffer.
BufferException
public void read(short[] dest, int dstOff, int numEls) throws BufferException
dest
- the short array to which data will be written.dstOff
- the subscript of the first element in the
dest array that will be overwritten.numEls
- the total number of items to be copied from
the buffer to elements of dest.
TypeMismatchException
- if the current section was not
created with type SHORT
or
SHORT_DYNAMIC
.
SectionSizeMismatchException
- if this operation
would imply reading past the end of the current section.
WrongStateException
- if buffer is not in a readable state,
or the current section is undefined, or the buffer has already been
freed.
java.lang.ArrayIndexOutOfBoundsException
- if the specified
combination of dstOff and numEls would imply
access to elements outside the bounds of dest.
DynamicBufferException
- if there are unforseen problems
reading the dynamic buffer.
BufferException
public void read(int[] dest, int dstOff, int numEls) throws BufferException
dest
- the int array to which data will be written.dstOff
- the subscript of the first element in the
dest array that will be overwritten.numEls
- the total number of items to be copied from
the buffer to elements of dest.
TypeMismatchException
- if the current section was not
created with type INT
or
INT_DYNAMIC
.
SectionSizeMismatchException
- if this operation
would imply reading past the end of the current section.
WrongStateException
- if buffer is not in a readable state,
or the current section is undefined, or the buffer has already been
freed.
java.lang.ArrayIndexOutOfBoundsException
- if the specified
combination of dstOff and numEls would imply
access to elements outside the bounds of dest.
DynamicBufferException
- if there are unforseen problems
reading the dynamic buffer.
BufferException
public void read(long[] dest, int dstOff, int numEls) throws BufferException
dest
- the long array to which data will be written.dstOff
- the subscript of the first element in the
dest array that will be overwritten.numEls
- the total number of items to be copied from
the buffer to elements of dest.
TypeMismatchException
- if the current section was not
created with type LONG
or
LONG_DYNAMIC
.
SectionSizeMismatchException
- if this operation
would imply reading past the end of the current section.
WrongStateException
- if buffer is not in a readable state,
or the current section is undefined, or the buffer has already been
freed.
java.lang.ArrayIndexOutOfBoundsException
- if the specified
combination of dstOff and numEls would imply
access to elements outside the bounds of dest.
DynamicBufferException
- if there are unforseen problems
reading the dynamic buffer.
BufferException
public void read(char[] dest, int dstOff, int numEls) throws BufferException
dest
- the char array to which data will be written.dstOff
- the subscript of the first element in the
dest array that will be overwritten.numEls
- the total number of items to be copied from
the buffer to elements of dest.
TypeMismatchException
- if the current section was not
created with type CHAR
or
CHAR_DYNAMIC
.
SectionSizeMismatchException
- if this operation
would imply reading past the end of the current section.
WrongStateException
- if buffer is not in a readable state,
or the current section is undefined, or the buffer has already been
freed.
java.lang.ArrayIndexOutOfBoundsException
- if the specified
combination of dstOff and numEls would imply
access to elements outside the bounds of dest.
DynamicBufferException
- if there are unforseen problems
reading the dynamic buffer.
BufferException
public void read(float[] dest, int dstOff, int numEls) throws BufferException
dest
- the float array to which data will be written.dstOff
- the subscript of the first element in the
dest array that will be overwritten.numEls
- the total number of items to be copied from
the buffer to elements of dest.
TypeMismatchException
- if the current section was not
created with type FLOAT
or
FLOAT_DYNAMIC
.
SectionSizeMismatchException
- if this operation
would imply reading past the end of the current section.
WrongStateException
- if buffer is not in a readable state,
or the current section is undefined, or the buffer has already been
freed.
java.lang.ArrayIndexOutOfBoundsException
- if the specified
combination of dstOff and numEls would imply
access to elements outside the bounds of dest.
DynamicBufferException
- if there are unforseen problems
reading the dynamic buffer.
BufferException
public void read(double[] dest, int dstOff, int numEls) throws BufferException
dest
- the double array to which data will be written.dstOff
- the subscript of the first element in the
dest array that will be overwritten.numEls
- the total number of items to be copied from
the buffer to elements of dest.
TypeMismatchException
- if the current section was not
created with type DOUBLE
or
DOUBLE_DYNAMIC
.
SectionSizeMismatchException
- if this operation
would imply reading past the end of the current section.
WrongStateException
- if buffer is not in a readable state,
or the current section is undefined, or the buffer has already been
freed.
java.lang.ArrayIndexOutOfBoundsException
- if the specified
combination of dstOff and numEls would imply
access to elements outside the bounds of dest.
DynamicBufferException
- if there are unforseen problems
reading the dynamic buffer.
BufferException
public void read(boolean[] dest, int dstOff, int numEls) throws BufferException
dest
- the boolean array to which data will be written.dstOff
- the subscript of the first element in the
dest array that will be overwritten.numEls
- the total number of items to be copied from
the buffer to elements of dest.
TypeMismatchException
- if the current section was not
created with type BOOLEAN
or
BOOLEAN_DYNAMIC
.
SectionSizeMismatchException
- if this operation
would imply reading past the end of the current section.
WrongStateException
- if buffer is not in a readable state,
or the current section is undefined, or the buffer has already been
freed.
java.lang.ArrayIndexOutOfBoundsException
- if the specified
combination of dstOff and numEls would imply
access to elements outside the bounds of dest.
DynamicBufferException
- if there are unforseen problems
reading the dynamic buffer.
BufferException
public void read(java.lang.Object[] dest, int dstOff, int numEls) throws BufferException
dest
- the Object array to which data will be written.dstOff
- the subscript of the first element in the
dest array that will be overwritten.numEls
- the total number of items to be copied from
the buffer to elements of dest.
TypeMismatchException
- if the current section was not
created with type OBJECT
.
SectionSizeMismatchException
- if this operation
would imply reading past the end of the current section.
WrongStateException
- if buffer is not in a readable state,
or the current section is undefined, or the buffer has already been
freed.
java.lang.ArrayIndexOutOfBoundsException
- if the specified
combination of dstOff and numEls would imply
access to elements outside the bounds of dest.
DynamicBufferException
- if there are problems
reading objects from the dynamic buffer.
BufferException
public void scatter(byte[] dest, int numEls, int idxOff, int[] indexes) throws BufferException
class description
for further details.
dest
- the byte array to which data will be written.numEls
- the total number of items to be copied from
the buffer to elements of dest.idxOff
- the subscript of the first element in the array
indexes to be used as an index into source.indexes
- an int array containing subscripts into
dest.
TypeMismatchException
- if the current section was not
created with type BYTE
or
BYTE_DYNAMIC
.
SectionSizeMismatchException
- if this operation
would imply reading past the end of the current section.
WrongStateException
- if buffer is not in a readable state,
or the current section is undefined, or the buffer has already been
freed.
java.lang.ArrayIndexOutOfBoundsException
- if the specified
combination of idxOff and numEls would imply
access to elements outside the bounds of indexes,
or if a selected element of indexes requires access
to an element outside the bounds of dest.
DynamicBufferException
- if there are unforseen problems
reading the dynamic buffer.
BufferException
public void scatter(short[] dest, int numEls, int idxOff, int[] indexes) throws BufferException
class description
for further details.
dest
- the short array to which data will be written.numEls
- the total number of items to be copied from
the buffer to elements of dest.idxOff
- the subscript of the first element in the array
indexes to be used as an index into source.indexes
- an int array containing subscripts into
dest.
TypeMismatchException
- if the current section was not
created with type SHORT
or
SHORT_DYNAMIC
.
SectionSizeMismatchException
- if this operation
would imply reading past the end of the current section.
WrongStateException
- if buffer is not in a readable state,
or the current section is undefined, or the buffer has already been
freed.
java.lang.ArrayIndexOutOfBoundsException
- if the specified
combination of idxOff and numEls would imply
access to elements outside the bounds of indexes,
or if a selected element of indexes requires access
to an element outside the bounds of dest.
DynamicBufferException
- if there are unforseen problems
reading the dynamic buffer.
BufferException
public void scatter(int[] dest, int numEls, int idxOff, int[] indexes) throws BufferException
class description
for further details.
dest
- the int array to which data will be written.numEls
- the total number of items to be copied from
the buffer to elements of dest.idxOff
- the subscript of the first element in the array
indexes to be used as an index into source.indexes
- an int array containing subscripts into
dest.
TypeMismatchException
- if the current section was not
created with type INT
or
INT_DYNAMIC
.
SectionSizeMismatchException
- if this operation
would imply reading past the end of the current section.
WrongStateException
- if buffer is not in a readable state,
or the current section is undefined, or the buffer has already been
freed.
java.lang.ArrayIndexOutOfBoundsException
- if the specified
combination of idxOff and numEls would imply
access to elements outside the bounds of indexes,
or if a selected element of indexes requires access
to an element outside the bounds of dest.
DynamicBufferException
- if there are unforseen problems
reading the dynamic buffer.
BufferException
public void scatter(long[] dest, int numEls, int idxOff, int[] indexes) throws BufferException
class description
for further details.
dest
- the long array to which data will be written.numEls
- the total number of items to be copied from
the buffer to elements of dest.idxOff
- the subscript of the first element in the array
indexes to be used as an index into source.indexes
- an int array containing subscripts into
dest.
TypeMismatchException
- if the current section was not
created with type LONG
or
LONG_DYNAMIC
.
SectionSizeMismatchException
- if this operation
would imply reading past the end of the current section.
WrongStateException
- if buffer is not in a readable state,
or the current section is undefined, or the buffer has already been
freed.
java.lang.ArrayIndexOutOfBoundsException
- if the specified
combination of idxOff and numEls would imply
access to elements outside the bounds of indexes,
or if a selected element of indexes requires access
to an element outside the bounds of dest.
DynamicBufferException
- if there are unforseen problems
reading the dynamic buffer.
BufferException
public void scatter(char[] dest, int numEls, int idxOff, int[] indexes) throws BufferException
class description
for further details.
dest
- the char array to which data will be written.numEls
- the total number of items to be copied from
the buffer to elements of dest.idxOff
- the subscript of the first element in the array
indexes to be used as an index into source.indexes
- an int array containing subscripts into
dest.
TypeMismatchException
- if the current section was not
created with type CHAR
or
CHAR_DYNAMIC
.
SectionSizeMismatchException
- if this operation
would imply reading past the end of the current section.
WrongStateException
- if buffer is not in a readable state,
or the current section is undefined, or the buffer has already been
freed.
java.lang.ArrayIndexOutOfBoundsException
- if the specified
combination of idxOff and numEls would imply
access to elements outside the bounds of indexes,
or if a selected element of indexes requires access
to an element outside the bounds of dest.
DynamicBufferException
- if there are unforseen problems
reading the dynamic buffer.
BufferException
public void scatter(float[] dest, int numEls, int idxOff, int[] indexes) throws BufferException
class description
for further details.
dest
- the float array to which data will be written.numEls
- the total number of items to be copied from
the buffer to elements of dest.idxOff
- the subscript of the first element in the array
indexes to be used as an index into source.indexes
- an int array containing subscripts into
dest.
TypeMismatchException
- if the current section was not
created with type FLOAT
or
FLOAT_DYNAMIC
.
SectionSizeMismatchException
- if this operation
would imply reading past the end of the current section.
WrongStateException
- if buffer is not in a readable state,
or the current section is undefined, or the buffer has already been
freed.
java.lang.ArrayIndexOutOfBoundsException
- if the specified
combination of idxOff and numEls would imply
access to elements outside the bounds of indexes,
or if a selected element of indexes requires access
to an element outside the bounds of dest.
DynamicBufferException
- if there are unforseen problems
reading the dynamic buffer.
BufferException
public void scatter(double[] dest, int numEls, int idxOff, int[] indexes) throws BufferException
class description
for further details.
dest
- the double array to which data will be written.numEls
- the total number of items to be copied from
the buffer to elements of dest.idxOff
- the subscript of the first element in the array
indexes to be used as an index into source.indexes
- an int array containing subscripts into
dest.
TypeMismatchException
- if the current section was not
created with type DOUBLE
or
DOUBLE_DYNAMIC
.
SectionSizeMismatchException
- if this operation
would imply reading past the end of the current section.
WrongStateException
- if buffer is not in a readable state,
or the current section is undefined, or the buffer has already been
freed.
java.lang.ArrayIndexOutOfBoundsException
- if the specified
combination of idxOff and numEls would imply
access to elements outside the bounds of indexes,
or if a selected element of indexes requires access
to an element outside the bounds of dest.
DynamicBufferException
- if there are unforseen problems
reading the dynamic buffer.
BufferException
public void scatter(boolean[] dest, int numEls, int idxOff, int[] indexes) throws BufferException
class description
for further details.
dest
- the boolean array to which data will be written.numEls
- the total number of items to be copied from
the buffer to elements of dest.idxOff
- the subscript of the first element in the array
indexes to be used as an index into source.indexes
- an int array containing subscripts into
dest.
TypeMismatchException
- if the current section was not
created with type BOOLEAN
or
BOOLEAN_DYNAMIC
.
SectionSizeMismatchException
- if this operation
would imply reading past the end of the current section.
WrongStateException
- if buffer is not in a readable state,
or the current section is undefined, or the buffer has already been
freed.
java.lang.ArrayIndexOutOfBoundsException
- if the specified
combination of idxOff and numEls would imply
access to elements outside the bounds of indexes,
or if a selected element of indexes requires access
to an element outside the bounds of dest.
DynamicBufferException
- if there are unforseen problems
reading the dynamic buffer.
BufferException
public void scatter(java.lang.Object[] dest, int numEls, int idxOff, int[] indexes) throws BufferException
class description
for further details.
dest
- the Object array to which data will be written.numEls
- the total number of items to be copied from
the buffer to elements of dest.idxOff
- the subscript of the first element in the array
indexes to be used as an index into source.indexes
- an int array containing subscripts into
dest.
TypeMismatchException
- if the current section was not
created with type OBJECT
.
SectionSizeMismatchException
- if this operation
would imply reading past the end of the current section.
WrongStateException
- if buffer is not in a readable state,
or the current section is undefined, or the buffer has already been
freed.
java.lang.ArrayIndexOutOfBoundsException
- if the specified
combination of idxOff and numEls would imply
access to elements outside the bounds of indexes,
or if a selected element of indexes requires access
to an element outside the bounds of dest.
DynamicBufferException
- if there are problems
reading objects from the dynamic buffer.
BufferException
public void strScatter(byte[] dest, int dstOff, int rank, int exts, int strs, int[] shape) throws BufferException
class description
for details.
dest
- the byte array to which data will be written.dstOff
- the subscript of the first element in the
dest array that will be overwritten.rank
- the rank or dimensionality of the region in
dest to which data is to be copied.exts
- the offset in the shape array of
the first of rank extents.strs
- the offset in the shape array of
the first of rank strides.shape
- an int array holding extent and stride information
for the region in dest to which data is to be copied.
TypeMismatchException
- if the current section was not
created with type BYTE
or
BYTE_DYNAMIC
.
SectionSizeMismatchException
- if this operation
would imply reading past the end of the current section.
WrongStateException
- if buffer is not in a readable state,
or the current section is undefined, or the buffer has already been
freed.
IllegalArgumentException
- if the specified rank is negative.
java.lang.ArrayIndexOutOfBoundsException
- if the values of rank
and exts and strs would imply
access to elements outside the bounds of shape, or
if the region defined by the resulting extents and strides would
imply access to elements outside the bounds of dest.
DynamicBufferException
- if there are unforseen problems
reading the dynamic buffer.
BufferException
public void strScatter(short[] dest, int dstOff, int rank, int exts, int strs, int[] shape) throws BufferException
class description
for details.
dest
- the short array to which data will be written.dstOff
- the subscript of the first element in the
dest array that will be overwritten.rank
- the rank or dimensionality of the region in
dest to which data is to be copied.exts
- the offset in the shape array of
the first of rank extents.strs
- the offset in the shape array of
the first of rank strides.shape
- an int array holding extent and stride information
for the region in dest to which data is to be copied.
TypeMismatchException
- if the current section was not
created with type SHORT
or
SHORT_DYNAMIC
.
SectionSizeMismatchException
- if this operation
would imply reading past the end of the current section.
WrongStateException
- if buffer is not in a readable state,
or the current section is undefined, or the buffer has already been
freed.
IllegalArgumentException
- if the specified rank is negative.
java.lang.ArrayIndexOutOfBoundsException
- if the values of rank
and exts and strs would imply
access to elements outside the bounds of shape, or
if the region defined by the resulting extents and strides would
imply access to elements outside the bounds of dest.
DynamicBufferException
- if there are unforseen problems
reading the dynamic buffer.
BufferException
public void strScatter(int[] dest, int dstOff, int rank, int exts, int strs, int[] shape) throws BufferException
class description
for details.
dest
- the int array to which data will be written.dstOff
- the subscript of the first element in the
dest array that will be overwritten.rank
- the rank or dimensionality of the region in
dest to which data is to be copied.exts
- the offset in the shape array of
the first of rank extents.strs
- the offset in the shape array of
the first of rank strides.shape
- an int array holding extent and stride information
for the region in dest to which data is to be copied.
TypeMismatchException
- if the current section was not
created with type INT
or
INT_DYNAMIC
.
SectionSizeMismatchException
- if this operation
would imply reading past the end of the current section.
WrongStateException
- if buffer is not in a readable state,
or the current section is undefined, or the buffer has already been
freed.
IllegalArgumentException
- if the specified rank is negative.
java.lang.ArrayIndexOutOfBoundsException
- if the values of rank
and exts and strs would imply
access to elements outside the bounds of shape, or
if the region defined by the resulting extents and strides would
imply access to elements outside the bounds of dest.
DynamicBufferException
- if there are unforseen problems
reading the dynamic buffer.
BufferException
public void strScatter(long[] dest, int dstOff, int rank, int exts, int strs, int[] shape) throws BufferException
class description
for details.
dest
- the long array to which data will be written.dstOff
- the subscript of the first element in the
dest array that will be overwritten.rank
- the rank or dimensionality of the region in
dest to which data is to be copied.exts
- the offset in the shape array of
the first of rank extents.strs
- the offset in the shape array of
the first of rank strides.shape
- an int array holding extent and stride information
for the region in dest to which data is to be copied.
TypeMismatchException
- if the current section was not
created with type LONG
or
LONG_DYNAMIC
.
SectionSizeMismatchException
- if this operation
would imply reading past the end of the current section.
WrongStateException
- if buffer is not in a readable state,
or the current section is undefined, or the buffer has already been
freed.
IllegalArgumentException
- if the specified rank is negative.
java.lang.ArrayIndexOutOfBoundsException
- if the values of rank
and exts and strs would imply
access to elements outside the bounds of shape, or
if the region defined by the resulting extents and strides would
imply access to elements outside the bounds of dest.
DynamicBufferException
- if there are unforseen problems
reading the dynamic buffer.
BufferException
public void strScatter(char[] dest, int dstOff, int rank, int exts, int strs, int[] shape) throws BufferException
class description
for details.
dest
- the char array to which data will be written.dstOff
- the subscript of the first element in the
dest array that will be overwritten.rank
- the rank or dimensionality of the region in
dest to which data is to be copied.exts
- the offset in the shape array of
the first of rank extents.strs
- the offset in the shape array of
the first of rank strides.shape
- an int array holding extent and stride information
for the region in dest to which data is to be copied.
TypeMismatchException
- if the current section was not
created with type CHAR
or
CHAR_DYNAMIC
.
SectionSizeMismatchException
- if this operation
would imply reading past the end of the current section.
WrongStateException
- if buffer is not in a readable state,
or the current section is undefined, or the buffer has already been
freed.
IllegalArgumentException
- if the specified rank is negative.
java.lang.ArrayIndexOutOfBoundsException
- if the values of rank
and exts and strs would imply
access to elements outside the bounds of shape, or
if the region defined by the resulting extents and strides would
imply access to elements outside the bounds of dest.
DynamicBufferException
- if there are unforseen problems
reading the dynamic buffer.
BufferException
public void strScatter(float[] dest, int dstOff, int rank, int exts, int strs, int[] shape) throws BufferException
class description
for details.
dest
- the float array to which data will be written.dstOff
- the subscript of the first element in the
dest array that will be overwritten.rank
- the rank or dimensionality of the region in
dest to which data is to be copied.exts
- the offset in the shape array of
the first of rank extents.strs
- the offset in the shape array of
the first of rank strides.shape
- an int array holding extent and stride information
for the region in dest to which data is to be copied.
TypeMismatchException
- if the current section was not
created with type FLOAT
or
FLOAT_DYNAMIC
.
SectionSizeMismatchException
- if this operation
would imply reading past the end of the current section.
WrongStateException
- if buffer is not in a readable state,
or the current section is undefined, or the buffer has already been
freed.
IllegalArgumentException
- if the specified rank is negative.
java.lang.ArrayIndexOutOfBoundsException
- if the values of rank
and exts and strs would imply
access to elements outside the bounds of shape, or
if the region defined by the resulting extents and strides would
imply access to elements outside the bounds of dest.
DynamicBufferException
- if there are unforseen problems
reading the dynamic buffer.
BufferException
public void strScatter(double[] dest, int dstOff, int rank, int exts, int strs, int[] shape) throws BufferException
class description
for details.
dest
- the double array to which data will be written.dstOff
- the subscript of the first element in the
dest array that will be overwritten.rank
- the rank or dimensionality of the region in
dest to which data is to be copied.exts
- the offset in the shape array of
the first of rank extents.strs
- the offset in the shape array of
the first of rank strides.shape
- an int array holding extent and stride information
for the region in dest to which data is to be copied.
TypeMismatchException
- if the current section was not
created with type DOUBLE
or
DOUBLE_DYNAMIC
.
SectionSizeMismatchException
- if this operation
would imply reading past the end of the current section.
WrongStateException
- if buffer is not in a readable state,
or the current section is undefined, or the buffer has already been
freed.
IllegalArgumentException
- if the specified rank is negative.
java.lang.ArrayIndexOutOfBoundsException
- if the values of rank
and exts and strs would imply
access to elements outside the bounds of shape, or
if the region defined by the resulting extents and strides would
imply access to elements outside the bounds of dest.
DynamicBufferException
- if there are unforseen problems
reading the dynamic buffer.
BufferException
public void strScatter(boolean[] dest, int dstOff, int rank, int exts, int strs, int[] shape) throws BufferException
class description
for details.
dest
- the boolean array to which data will be written.dstOff
- the subscript of the first element in the
dest array that will be overwritten.rank
- the rank or dimensionality of the region in
dest to which data is to be copied.exts
- the offset in the shape array of
the first of rank extents.strs
- the offset in the shape array of
the first of rank strides.shape
- an int array holding extent and stride information
for the region in dest to which data is to be copied.
TypeMismatchException
- if the current section was not
created with type BOOLEAN
or
BOOLEAN_DYNAMIC
.
SectionSizeMismatchException
- if this operation
would imply reading past the end of the current section.
WrongStateException
- if buffer is not in a readable state,
or the current section is undefined, or the buffer has already been
freed.
IllegalArgumentException
- if the specified rank is negative.
java.lang.ArrayIndexOutOfBoundsException
- if the values of rank
and exts and strs would imply
access to elements outside the bounds of shape, or
if the region defined by the resulting extents and strides would
imply access to elements outside the bounds of dest.
DynamicBufferException
- if there are unforseen problems
reading the dynamic buffer.
BufferException
public void strScatter(java.lang.Object[] dest, int dstOff, int rank, int exts, int strs, int[] shape) throws BufferException
class description
for details.
dest
- the Object array to which data will be written.dstOff
- the subscript of the first element in the
dest array that will be overwritten.rank
- the rank or dimensionality of the region in
dest to which data is to be copied.exts
- the offset in the shape array of
the first of rank extents.strs
- the offset in the shape array of
the first of rank strides.shape
- an int array holding extent and stride information
for the region in dest to which data is to be copied.
TypeMismatchException
- if the current section was not
created with type OBJECT
.
SectionSizeMismatchException
- if this operation
would imply reading past the end of the current section.
WrongStateException
- if buffer is not in a readable state,
or the current section is undefined, or the buffer has already been
freed.
IllegalArgumentException
- if the specified rank is negative.
java.lang.ArrayIndexOutOfBoundsException
- if the values of rank
and exts and strs would imply
access to elements outside the bounds of shape, or
if the region defined by the resulting extents and strides would
imply access to elements outside the bounds of dest.
DynamicBufferException
- if there are problems
reading objects from the dynamic buffer.
BufferException
public RawBuffer getStaticBuffer()
public void setStaticBuffer(RawBuffer staticBuffer)
public java.nio.ByteOrder getEncoding()
public void setEncoding(java.nio.ByteOrder encoding)
public int getSize()
public void setSize(int size)
public byte[] getDynamicBuffer()
public void setDynamicBuffer(byte[] dynamicBuffer)
public boolean isWritable()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |