Interface IFileDatabaseReader

All Superinterfaces:
AutoCloseable, Closeable
All Known Implementing Classes:
JDB2Reader

public interface IFileDatabaseReader extends Closeable
A database record reader.
See Also:
  • Method Details

    • hasBackingFile

      boolean hasBackingFile()
      Determine if this database is backed by a file.
      Returns:
      true if a backing file is available
    • getBackingFile

      File getBackingFile() throws NoSuchFileException
      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

      JDB2Reader.RecordDescription getRecordDescription(int type)
      Retrieve the description of a record of a given type.
      Parameters:
      type - record type
      Returns:
      the matching record description, or null if no such record exists
    • getRecord

      InputStream getRecord(int type) throws IOException
      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