Class RestoreFile

    • Field Detail

      • nbRecords

        private int nbRecords
      • nbRead

        private int nbRead
    • Constructor Detail

      • RestoreFile

        public RestoreFile​(File file)
                    throws IOException
        Opens a backup file to restore it.
        Parameters:
        file - The file to restore.
        Throws:
        IOException - An error occurs.
    • Method Detail

      • getNbRecords

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

        public BackupRecord getNextRecord()
                                   throws IOException
        Reads the next record in file.
        Returns:
        the next record in file.
        Throws:
        IOException - An error occurs.
      • list

        public static void list​(File file,
                                Pattern filter)
                         throws IOException
        Lists the objects contained in the backup file.
        Parameters:
        file - The backup file.
        filter - The filter.
        Throws:
        IOException - An error occurs.
      • extract

        public static void extract​(File backupFile,
                                   Pattern filter,
                                   File extractDir)
                            throws IOException
        Extracts the objects contained in the backup file to the specified directory.
        Parameters:
        backupFile - The backup file.
        filter - The filter.
        extractDir - The directory where to extract the data.
        Throws:
        IOException - An error occurs.
      • dump

        public static void dump​(File file,
                                Pattern filter)
                         throws IOException
        Dumps the objects contained in the backup file.
        Parameters:
        file - The backup file.
        filter - The filter.
        Throws:
        IOException - An error occurs.