Package com.pnfsoftware.jeb.core.dao
Interface IFileDatabaseReader
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
JDB2Reader
A database record reader.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionRetrieve the backing file, if any.getRecord(int type) Retrieve a record.Retrieve a record.getRecordDescription(int type) Retrieve the description of a record of a given type.Retrieve the descriptions of all records contained in the database.booleanDetermine if this database is backed by a file.
-
Method Details
-
hasBackingFile
boolean hasBackingFile()Determine if this database is backed by a file.- Returns:
trueif a backing file is available
-
getBackingFile
Retrieve the backing file, if any.- Returns:
- the backing file
- Throws:
NoSuchFileException- if no backing file exists
-
getRecordDescriptions
List<JDB2Reader.RecordDescription> getRecordDescriptions()Retrieve the descriptions of all records contained in the database.- Returns:
- the record descriptions in storage order
-
getRecordDescription
Retrieve the description of a record of a given type.- Parameters:
type- record type- Returns:
- the matching record description, or
nullif no such record exists
-
getRecord
Retrieve a record.- Parameters:
type- record type- Returns:
- record data stream
- Throws:
IOException- if the record could not be retrieved
-
getRecord
Retrieve a record.- Parameters:
r- record description- Returns:
- record data stream
- Throws:
IOException- if the record could not be retrieved
-