code: public static void writeToCheckpoint(OutputStream output, List<? extends Checkpointed> components)
        throws IOException, InterruptedException {
      OutputChunked chunked = new OutputChunked(
          new CheckpointOutputStream(output, CheckpointType.COMPOUND), 64 * Constants.KB);
      for (Checkpointed component : components) {
        chunked.writeString(component.getCheckpointName().toString());
        component.writeToCheckpoint(chunked);
        chunked.endChunks();
      }
      chunked.flush();
    }
docs: Writes a composite checkpoint for the given checkpointed components.
  
  This is the complement of {@link #restoreFromCheckpoint(CheckpointInputStream, List)}.
  
  @param output the stream to write to
  @param components the components to checkpoint