public abstract class FieldReader<S,A>
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
abstract A |
createArray(int nel)
Creates a new instance of an array value corresponding to this
reader's array type.
|
java.lang.Class<A> |
getArrayClass()
Returns the type of array value into which this reader can store values.
|
gov.nasa.pds.label.object.FieldType |
getFieldType()
Returns the field type for this reader.
|
static FieldReader<?,?> |
getInstance(gov.nasa.pds.label.object.FieldType ftype,
java.lang.String[] blankTxts)
Returns a FieldReader instance for a given FieldType.
|
java.lang.Class<S> |
getScalarClass()
Returns the type of scalar object that this reader will read.
|
abstract void |
readElement(byte[] buf,
int offset,
int length,
int startBit,
int endBit,
A array,
int iel)
Reads an value from a buffer in accordance with this field type
and stores it in one element of a supplied typed array.
|
abstract S |
readScalar(byte[] buf,
int offset,
int length,
int startBit,
int endBit)
Reads a typed scalar value from a buffer in accordance
with this field type.
|
public abstract S readScalar(byte[] buf, int offset, int length, int startBit, int endBit)
The startBit and endBit arguments reflect their appearence in the corresponding NASA classes, but I don't know what they do.
buf
- byte buffer containing dataoffset
- index into buf of byte at which data value beginslength
- number of bytes over which value is representedstartBit
- ??endBit
- ??public abstract void readElement(byte[] buf, int offset, int length, int startBit, int endBit, A array, int iel)
The startBit and endBit arguments reflect their appearence in the corresponding NASA classes, but I don't know what they do.
buf
- byte buffer containing dataoffset
- index into buf of byte at which data value beginslength
- number of bytes over which value is representedstartBit
- ??endBit
- ??array
- array into which read value is storediel
- index into array a wich value is writtenpublic abstract A createArray(int nel)
nel
- array sizepublic java.lang.Class<S> getScalarClass()
public java.lang.Class<A> getArrayClass()
public gov.nasa.pds.label.object.FieldType getFieldType()
public static FieldReader<?,?> getInstance(gov.nasa.pds.label.object.FieldType ftype, java.lang.String[] blankTxts)
ftype
- field typeblankTxts
- array of string values representing field values
that are to be mapped to null when read