code: public void incrementalRestore(File incrementalBackupFile) throws FileNotFoundException, IOException,
        ClassNotFoundException, RepositoryException
     {
        ObjectInputStream ois = null;
        try
        {
           ois = new ObjectInputStream(PrivilegedFileHelper.fileInputStream(incrementalBackupFile));
  
           while (true)
           {
              TransactionChangesLog changesLog = readExternal(ois);
              changesLog.setSystemId(Constants.JCR_CORE_RESTORE_WORKSPACE_INITIALIZER_SYSTEM_ID); // mark changes
  
              ChangesLogIterator cli = changesLog.getLogIterator();
              while (cli.hasNextLog())
              {
                 if (cli.nextLog().getEventType() == ExtendedEvent.LOCK)
                 {
                    cli.removeLog();
                 }
              }
  
              saveChangesLog(changesLog);
           }
        }
        catch (EOFException ioe)
        {
           if (LOG.isTraceEnabled())
           {
              LOG.trace("An exception occurred: " + ioe.getMessage());
           }
        }
     }
docs: Perform incremental restore operation.
  
  @param incrementalBackupFile
  incremental backup file
  @throws FileNotFoundException
  @throws IOException
  @throws ClassNotFoundException
  @throws RepositoryException