|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bbn.openmap.dataAccess.iso8211.DDFRecord
public class DDFRecord
Contains instance data from one data record (DR). The data is contained as a list of DDFField instances partitioning the raw data into fields. Class contains one DR record from a file. We read into the same record object repeatedly to ensure that repeated leaders can be easily preserved.
Field Summary | |
---|---|
protected boolean |
bIsClone
|
protected int |
nDataSize
|
protected int |
nFieldCount
|
protected int |
nFieldOffset
|
protected boolean |
nReuseHeader
|
protected byte[] |
pachData
|
protected java.util.Vector |
paoFields
|
protected DDFModule |
poModule
|
Fields inherited from interface com.bbn.openmap.dataAccess.iso8211.DDFConstants |
---|
DDF_FIELD_TERMINATOR, DDF_FOOTER_SIZE, DDF_LEADER_SIZE, DDF_UNIT_TERMINATOR |
Constructor Summary | |
---|---|
DDFRecord(DDFModule poModuleIn)
|
Method Summary | |
---|---|
void |
clear()
Clear any information associated with the last header in preparation for reading a new header. |
DDFField |
findField(java.lang.String pszName,
int iFieldIndex)
Find the named field within this record. |
byte[] |
getData()
Fetch the raw data for this record. |
int |
getDataSize()
Fetch size of records raw data (GetData()) in bytes. |
DDFField |
getField(int i)
Fetch field object based on index. |
int |
getFieldCount()
Get the number of DDFFields on this record. |
double |
getFloatSubfield(java.lang.String pszField,
int iFieldIndex,
java.lang.String pszSubfield,
int iSubfieldIndex)
Fetch value of a subfield as a float (double). |
int |
getIntSubfield(java.lang.String pszField,
int iFieldIndex,
java.lang.String pszSubfield,
int iSubfieldIndex)
Fetch value of a subfield as an integer. |
DDFModule |
getModule()
Fetch the DDFModule with which this record is associated. |
java.util.Iterator |
iterator()
Get an iterator over the fields. |
protected boolean |
read()
Read a record of data from the file, and parse the header to build a field list for the record (or reuse the existing one if reusing headers). |
protected boolean |
readHeader()
This perform the header reading and parsing job for the read() method. |
java.lang.String |
toString()
Write out record contents to debugging file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected DDFModule poModule
protected boolean nReuseHeader
protected int nFieldOffset
protected int nDataSize
protected byte[] pachData
protected int nFieldCount
protected java.util.Vector paoFields
protected boolean bIsClone
Constructor Detail |
---|
public DDFRecord(DDFModule poModuleIn)
Method Detail |
---|
public int getFieldCount()
public int getDataSize()
public byte[] getData()
public DDFModule getModule()
public java.lang.String toString()
toString
in class java.lang.Object
protected boolean read()
public void clear()
protected boolean readHeader()
public DDFField findField(java.lang.String pszName, int iFieldIndex)
pszName
- The name of the field to fetch. The comparison
is case insensitive.iFieldIndex
- The instance of this field to fetch. Use
zero (the default) for the first instance.
public DDFField getField(int i)
i
- The index of the field to fetch. Between 0 and
GetFieldCount()-1.
public java.util.Iterator iterator()
public int getIntSubfield(java.lang.String pszField, int iFieldIndex, java.lang.String pszSubfield, int iSubfieldIndex)
pszField
- The name of the field containing the subfield.iFieldIndex
- The instance of this field within the
record. Use zero for the first instance of this field.pszSubfield
- The name of the subfield within the selected
field.iSubfieldIndex
- The instance of this subfield within the
record. Use zero for the first instance.
public double getFloatSubfield(java.lang.String pszField, int iFieldIndex, java.lang.String pszSubfield, int iSubfieldIndex)
pszField
- The name of the field containing the subfield.iFieldIndex
- The instance of this field within the
record. Use zero for the first instance of this field.pszSubfield
- The name of the subfield within the selected
field.iSubfieldIndex
- The instance of this subfield within the
record. Use zero for the first instance.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |