|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.bristol.star.cdf.record.DataReader
public class DataReader
Reads items with a given data type from a buffer into an array.
Constructor Summary | |
---|---|
DataReader(DataType dataType,
int nelPerItem,
int nItem)
Constructor. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
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 1Method Detail |
---|
public 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 read
java.io.IOException
public int getRecordSize()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |