|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bbn.openmap.dataAccess.iso8211.DDFSubfieldDefinition
public class DDFSubfieldDefinition
Information from the DDR record describing one subfield of a DDFFieldDefn. All subfields of a field will occur in each occurrence of that field (as a DDFField) in a DDFRecord. Subfield's actually contain formatted data (as instances within a record).
Nested Class Summary | |
---|---|
static interface |
DDFSubfieldDefinition.DDFBinaryFormat
|
Field Summary | |
---|---|
protected boolean |
bIsVariable
bIsVariable determines whether we using the chFormatDelimeter (true), or the fixed width (false). |
protected char |
chFormatDelimeter
|
protected int |
eBinaryFormat
|
protected DDFDataType |
eType
|
protected int |
nFormatWidth
|
protected java.lang.String |
pszFormatString
|
protected java.lang.String |
pszName
|
Fields inherited from interface com.bbn.openmap.dataAccess.iso8211.DDFConstants |
---|
DDF_FIELD_TERMINATOR, DDF_FOOTER_SIZE, DDF_LEADER_SIZE, DDF_UNIT_TERMINATOR |
Constructor Summary | |
---|---|
DDFSubfieldDefinition()
|
Method Summary | |
---|---|
java.lang.String |
dumpData(byte[] pachData,
int nMaxBytes)
Dump subfield value to debugging file. |
double |
extractFloatData(byte[] pachSourceData,
int nMaxBytes,
MutableInt pnConsumedBytes)
Extract a subfield value as a float. |
int |
extractIntData(byte[] pachSourceData,
int nMaxBytes,
MutableInt pnConsumedBytes)
Extract a subfield value as an integer. |
int |
getDataLength(byte[] pachSourceData,
int nMaxBytes,
MutableInt pnConsumedBytes)
Scan for the end of variable length data. |
java.lang.String |
getFormat()
Get pointer to subfield format string |
java.lang.String |
getName()
Get pointer to subfield name. |
DDFDataType |
getType()
Get the general type of the subfield. |
int |
getWidth()
|
boolean |
setFormat(java.lang.String pszFormat)
While interpreting the format string we don't support: Passing an explicit terminator for variable length field. |
void |
setName(java.lang.String pszNewName)
Set the name of the subfield. |
java.lang.String |
toString()
Write out subfield definition info. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.lang.String pszName
protected java.lang.String pszFormatString
protected DDFDataType eType
protected int eBinaryFormat
protected boolean bIsVariable
protected char chFormatDelimeter
protected int nFormatWidth
Constructor Detail |
---|
public DDFSubfieldDefinition()
Method Detail |
---|
public int getWidth()
public java.lang.String getName()
public java.lang.String getFormat()
public DDFDataType getType()
public void setName(java.lang.String pszNewName)
public boolean setFormat(java.lang.String pszFormat)
public java.lang.String toString()
toString
in class java.lang.Object
public int getDataLength(byte[] pachSourceData, int nMaxBytes, MutableInt pnConsumedBytes)
This method is mainly for internal use, or for applications which want the raw binary data to interpret themselves. Otherwise use one of ExtractStringData(), ExtractIntData() or ExtractFloatData().
pachSourceData
- The pointer to the raw data for this field. This may have come
from DDFRecord::GetData(), taking into account skip factors
over previous subfields data.nMaxBytes
- The maximum number of bytes that are accessible after
pachSourceData.pnConsumedBytes
- the number of bytes used.
public double extractFloatData(byte[] pachSourceData, int nMaxBytes, MutableInt pnConsumedBytes)
pachSourceData
- The pointer to the raw data for this field. This may have come
from DDFRecord::GetData(), taking into account skip factors
over previous subfields data.nMaxBytes
- The maximum number of bytes that are accessible after
pachSourceData.pnConsumedBytes
- Pointer to an integer into which the number of bytes consumed
by this field should be written. May be null to ignore. This
is used as a skip factor to increment pachSourceData to point
to the next subfields data.
public int extractIntData(byte[] pachSourceData, int nMaxBytes, MutableInt pnConsumedBytes)
pachSourceData
- The pointer to the raw data for this field. This may have come
from DDFRecord::GetData(), taking into account skip factors
over previous subfields data.nMaxBytes
- The maximum number of bytes that are accessible after
pachSourceData.pnConsumedBytes
- Pointer to an integer into which the number of bytes consumed
by this field should be written. May be null to ignore. This
is used as a skip factor to increment pachSourceData to point
to the next subfields data.
public java.lang.String dumpData(byte[] pachData, int nMaxBytes)
pachData
- Pointer to data for this subfield.nMaxBytes
- Maximum number of bytes available in pachData.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |