public class DataReader
extends java.lang.Object
Constructor and Description |
---|
DataReader(DataType dataType,
int nelPerItem,
int nItem)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
createValueArray()
Creates a workspace array which can contain a value read for one record.
|
int |
getRecordSize()
Returns the size in bytes of one record as stored in the data buffer.
|
void |
readValue(Buf buf,
long offset,
java.lang.Object valueArray)
Reads a value from a data buffer into a workspace array.
|
public DataReader(DataType dataType, int nelPerItem, int nItem)
dataType
- data typenelPerItem
- number of dataType elements per read item;
usually 1 except for character datanItem
- number of items of given data type in the array,
for scalar records it will be 1public java.lang.Object createValueArray()
public void readValue(Buf buf, long offset, java.lang.Object valueArray) throws java.io.IOException
buf
- data bufferoffset
- byte offset into buf of data startvalueArray
- object created by createValueArray
into which results will be readjava.io.IOException
public int getRecordSize()