Class JDB2Reader
java.lang.Object
com.pnfsoftware.jeb.core.dao.impl.JDB2Reader
- All Implemented Interfaces:
IFileDatabaseReader
,Closeable
,AutoCloseable
JDB2 (JEB saved project database) record reader. A JDB2 is made of records.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Definition of a JDB2 record. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Retrieve the backing file, if any.int
Retrieve the version-integer of the JEB build that originally created the JDB2 database.getRecord
(int type) Retrieve a record.Retrieve a record.getRecordDescription
(int type) boolean
Determine if this database is backed by a file.
-
Constructor Details
-
JDB2Reader
- Throws:
IOException
-
-
Method Details
-
getJebVersionInt
public int getJebVersionInt()Retrieve the version-integer of the JEB build that originally created the JDB2 database. On older JDB2, this value is not set and will be 0. If a non-zero value is returned, it can be converted to a partial version object usingVersion.fromInt(int)
.- Returns:
-
hasBackingFile
public boolean hasBackingFile()Description copied from interface:IFileDatabaseReader
Determine if this database is backed by a file.- Specified by:
hasBackingFile
in interfaceIFileDatabaseReader
- Returns:
-
getBackingFile
Description copied from interface:IFileDatabaseReader
Retrieve the backing file, if any.- Specified by:
getBackingFile
in interfaceIFileDatabaseReader
- Returns:
-
getRecordDescriptions
- Specified by:
getRecordDescriptions
in interfaceIFileDatabaseReader
- Returns:
-
getRecordDescription
- Specified by:
getRecordDescription
in interfaceIFileDatabaseReader
- Parameters:
type
- record type- Returns:
-
getRecord
Description copied from interface:IFileDatabaseReader
Retrieve a record.- Specified by:
getRecord
in interfaceIFileDatabaseReader
- Parameters:
type
- record type- Returns:
- record data stream
- Throws:
IOException
-
getRecord
Description copied from interface:IFileDatabaseReader
Retrieve a record.- Specified by:
getRecord
in interfaceIFileDatabaseReader
- Returns:
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-