code: public static void writeJournalEntryCheckpoint(OutputStream output, JournalEntryIterable iterable)
        throws IOException, InterruptedException {
      output = new CheckpointOutputStream(output, CheckpointType.JOURNAL_ENTRY);
      Iterator<JournalEntry> it = iterable.getJournalEntryIterator();
      LOG.info("Write journal entry checkpoint");
      while (it.hasNext()) {
        if (Thread.interrupted()) {
          throw new InterruptedException();
        }
        it.next().writeDelimitedTo(output);
      }
      output.flush();
    }
docs: Writes a checkpoint of the entries in the given iterable.
  
  This is the complement of
  {@link #restoreJournalEntryCheckpoint(CheckpointInputStream, Journaled)}.
  
  @param output the stream to write to
  @param iterable the iterable for fetching journal entries