Class BackupFile

    • Field Detail

      • nbRecords

        private int nbRecords
      • closed

        private volatile boolean closed
    • Constructor Detail

      • BackupFile

        public BackupFile​(File file)
                   throws IOException
        Creates a new backup file.
        Parameters:
        file - The file to create.
        Throws:
        IOException - An error occurs during creation.
    • Method Detail

      • getNbRecords

        public int getNbRecords()
        Number of objects recorded in the file.
        Returns:
        the number of objects recorded in the file.
      • backup

        public void backup​(BackupRecord record)
                    throws IOException
        Backups an object in the file.
        Parameters:
        buf - the byte array to store.
        dirName - the directory name of the object.
        name - the name of the object.
        Throws:
        IOException - An error occurs.