|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.bbn.openmap.dataAccess.iso8211.DDFModule
The class that represents a ISO 8211 file.
| Field Summary | |
protected byte |
_appIndicator
|
protected java.lang.String |
_extendedCharSet
|
protected int |
_fieldAreaStart
|
protected int |
_fieldControlLength
|
protected byte |
_inlineCodeExtensionIndicator
|
protected byte |
_interchangeLevel
|
protected byte |
_leaderIden
|
protected int |
_recLength
|
protected int |
_sizeFieldLength
|
protected int |
_sizeFieldPos
|
protected int |
_sizeFieldTag
|
protected byte |
_versionNumber
|
protected java.lang.String |
fileName
|
protected BinaryFile |
fpDDF
|
protected long |
nFirstRecordOffset
|
protected java.util.Vector |
paoFieldDefns
|
protected DDFRecord |
poRecord
|
| Fields inherited from interface com.bbn.openmap.dataAccess.iso8211.DDFConstants |
DDF_FIELD_TERMINATOR, DDF_LEADER_SIZE, DDF_UNIT_TERMINATOR |
| Constructor Summary | |
DDFModule()
The constructor. |
|
DDFModule(java.lang.String ddfName)
|
|
| Method Summary | |
void |
close()
Close an ISO 8211 file. |
void |
destroy()
Clean up, get rid of data and close file pointer. |
java.lang.String |
dump()
|
DDFFieldDefinition |
findFieldDefn(java.lang.String pszFieldName)
Fetch the definition of the named field. |
DDFFieldDefinition |
getField(int i)
Fetch a field definition by index. |
BinaryFile |
open(java.lang.String pszFilename)
Open a ISO 8211 (DDF) file for reading, and read the DDR record to build the field definitions. |
int |
read()
Convenience method to read a byte from the data file. |
int |
read(byte[] toData,
int offset,
int length)
Method for other components to call to get the DDFModule to read bytes into the provided array. |
DDFRecord |
readRecord()
Read one record from the file, and return to the application. |
void |
reopen()
|
void |
rewind(long nOffset)
Return to first record. |
void |
seek(long pos)
Convenience method to seek to a location in the data file. |
java.lang.String |
toString()
Write out module info to debugging file. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected BinaryFile fpDDF
protected java.lang.String fileName
protected long nFirstRecordOffset
protected byte _interchangeLevel
protected byte _inlineCodeExtensionIndicator
protected byte _versionNumber
protected byte _appIndicator
protected int _fieldControlLength
protected java.lang.String _extendedCharSet
protected int _recLength
protected byte _leaderIden
protected int _fieldAreaStart
protected int _sizeFieldLength
protected int _sizeFieldPos
protected int _sizeFieldTag
protected java.util.Vector paoFieldDefns
protected DDFRecord poRecord
| Constructor Detail |
public DDFModule()
public DDFModule(java.lang.String ddfName)
throws java.io.IOException
| Method Detail |
public void close()
public void destroy()
public BinaryFile open(java.lang.String pszFilename)
throws java.io.IOException
pszFilename - The name of the file to open.
java.io.IOExceptionpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String dump()
public DDFFieldDefinition findFieldDefn(java.lang.String pszFieldName)
pszFieldName - The name of the field to search for. The
comparison is case insensitive.
public DDFRecord readRecord()
public int read(byte[] toData,
int offset,
int length)
toData - the bytes to put data into.offset - the byte offset to start reading from, whereever
the pointer currently is.length - the number of bytes to read.
public int read()
public void seek(long pos)
throws java.io.IOException
pos - the byte position to reposition the file pointer to.
java.io.IOExceptionpublic DDFFieldDefinition getField(int i)
i - (from 0 to GetFieldCount() - 1.
public void rewind(long nOffset)
throws java.io.IOException
nOffset - the offset in the file to return to. By default
this is -1, a special value indicating that reading
should return to the first data record. Otherwise it is
an absolute byte offset in the file.
java.io.IOExceptionpublic void reopen()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||