code: public static void restoreJournalEntryCheckpoint(CheckpointInputStream input, Journaled journaled)
        throws IOException {
      Preconditions.checkState(input.getType() == CheckpointType.JOURNAL_ENTRY,
          "Unrecognized checkpoint type when restoring %s: %s", journaled.getCheckpointName(),
          input.getType());
      journaled.resetState();
      LOG.info("Reading journal entries");
      JournalEntryStreamReader reader = new JournalEntryStreamReader(input);
      JournalEntry entry;
      while ((entry = reader.readEntry()) != null) {
        try {
          journaled.processJournalEntry(entry);
        } catch (Throwable t) {
          handleJournalReplayFailure(LOG, t,
              "Failed to process journal entry %s from a journal checkpoint", entry);
        }
      }
    }
docs: Restores the given journaled object from the journal entries in the input stream.
  
  This is the complement of
  {@link #writeJournalEntryCheckpoint(OutputStream, JournalEntryIterable)}.
  
  @param input the stream to read from
  @param journaled the object to restore