public interface DataBuffer
extends java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DOUBLE |
static java.lang.String |
FLOAT |
Modifier and Type | Method and Description |
---|---|
byte[] |
asBytes()
Raw byte array storage
|
double[] |
asDouble()
Return the buffer as a double array
Relative to the datatype, this will either be a copy
or a reference.
|
float[] |
asFloat()
Return the buffer as a float array
Relative to the datatype, this will either be a copy
or a reference.
|
int[] |
asInt()
Return the buffer as an int array
Relative to the datatype, this will either be a copy
or a reference.
|
<E> E[] |
asType()
Returns the element buffer of the specified type.
|
java.lang.String |
dataType()
The data type of the buffer
|
void |
destroy()
Clears this buffer
|
DataBuffer |
dup()
Return a copy of this buffer
|
void |
flush()
Flush the data buffer
|
double |
getDouble(int i)
Get element i in the buffer as a double
|
<E> E |
getElement(int i)
Get element i in the buffer as a double
|
float |
getFloat(int i)
Get element i in the buffer as a double
|
int |
getInt(int ix)
Get the int at the specified index
|
java.lang.Number |
getNumber(int i)
Get element i in the buffer as a double
|
int |
length()
Returns the length of the buffer
|
void |
put(int i,
double element)
Assign an element in the buffer to the specified index
|
<E> void |
put(int i,
E element)
Assign an element in the buffer to the specified index
|
void |
put(int i,
float element)
Assign an element in the buffer to the specified index
|
void |
put(int i,
int element)
Assign an element in the buffer to the specified index
|
static final java.lang.String DOUBLE
static final java.lang.String FLOAT
byte[] asBytes()
java.lang.String dataType()
float[] asFloat()
double[] asDouble()
int[] asInt()
<E> E[] asType()
E
- double getDouble(int i)
i
- the element to getFloatfloat getFloat(int i)
i
- the element to getFloatjava.lang.Number getNumber(int i)
i
- the element to getFloat<E> E getElement(int i)
i
- the element to getFloatvoid put(int i, float element)
i
- the indexelement
- the element to assignvoid put(int i, double element)
i
- the indexelement
- the element to assignvoid put(int i, int element)
i
- the indexelement
- the element to assign<E> void put(int i, E element)
i
- the indexelement
- the element to assignint length()
int getInt(int ix)
ix
- the int at the specified indexDataBuffer dup()
void flush()
void destroy()
Copyright © 2014. All Rights Reserved.