public class DDFField
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected int |
dataLength |
protected int |
dataPosition |
protected int |
headerOffset |
protected byte[] |
pachData |
protected DDFFieldDefinition |
poDefn |
protected java.util.Hashtable |
subfields |
Constructor and Description |
---|
DDFField() |
DDFField(DDFFieldDefinition poDefnIn,
byte[] pachDataIn) |
DDFField(DDFFieldDefinition poDefnIn,
byte[] pachDataIn,
boolean doSubfields) |
DDFField(DDFFieldDefinition poDefnIn,
int dataPositionIn,
int dataLengthIn) |
Modifier and Type | Method and Description |
---|---|
protected void |
addSubfield(DDFSubfield ddfs) |
void |
buildSubfields() |
byte[] |
getData()
Return the pointer to the entire data block for this record.
|
int |
getDataLength()
If getData() returns null, it'll be your responsibilty to go
after the data you need for this field.
|
int |
getDataPosition()
If getData() returns null, it'll be your responsibilty to go
after the data you need for this field.
|
int |
getDataSize()
Return the number of bytes in the data block returned by
GetData().
|
DDFFieldDefinition |
getFieldDefn()
Fetch the corresponding DDFFieldDefn.
|
int |
getHeaderOffset()
Get how many bytes to add to the data position for absolute
position in the data file for the field data.
|
int |
getRepeatCount()
How many times do the subfields of this record repeat? This
will always be one for non-repeating fields.
|
DDFSubfield |
getSubfield(java.lang.String subfieldName)
Will return a DDFSubfield object with the given name, or the
first one off the list for a repeating subfield.
|
byte[] |
getSubfieldData(DDFSubfieldDefinition poSFDefn,
MutableInt pnMaxBytes,
int iSubfieldIndex)
Fetch raw data pointer for a particular subfield of this field.
|
java.util.List |
getSubfields(java.lang.String subfieldName)
Will return an ordered list of DDFSubfield objects.
|
void |
initialize(DDFFieldDefinition poDefnIn,
byte[] pachDataIn) |
protected void |
setHeaderOffset(int headerOffsetIn)
Set how many bytes to add to the data position for absolute
position in the data file for the field data.
|
java.lang.String |
toString()
Creates a string with variety of information about this field,
and all it's subfields is written to the given debugging file
handle.
|
protected DDFFieldDefinition poDefn
protected byte[] pachData
protected java.util.Hashtable subfields
protected int dataPosition
protected int dataLength
protected int headerOffset
public DDFField()
public DDFField(DDFFieldDefinition poDefnIn, int dataPositionIn, int dataLengthIn)
public DDFField(DDFFieldDefinition poDefnIn, byte[] pachDataIn)
public DDFField(DDFFieldDefinition poDefnIn, byte[] pachDataIn, boolean doSubfields)
public void initialize(DDFFieldDefinition poDefnIn, byte[] pachDataIn)
protected void setHeaderOffset(int headerOffsetIn)
public int getHeaderOffset()
public byte[] getData()
public int getDataSize()
public DDFFieldDefinition getFieldDefn()
public int getDataPosition()
public int getDataLength()
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.List getSubfields(java.lang.String subfieldName)
public DDFSubfield getSubfield(java.lang.String subfieldName)
public byte[] getSubfieldData(DDFSubfieldDefinition poSFDefn, MutableInt pnMaxBytes, int iSubfieldIndex)
poSFDefn
- The definition of the subfield for which the
raw data pointer is desired.pnMaxBytes
- The maximum number of bytes that can be
accessed from the returned data pointer is placed in
this int, unless it is null.iSubfieldIndex
- The instance of this subfield to fetch.
Use zero (the default) for the first instance.public void buildSubfields()
protected void addSubfield(DDFSubfield ddfs)
public int getRepeatCount()
Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details