code: public synchronized void truncate() throws OpenJournalException, IOException {
          if (!opened) {
              for (DataFile file : dataFiles.values()) {
                  removeDataFile(file);
              }
          } else {
              throw new OpenJournalException("The journal is open! The journal must be closed to be truncated.");
          }
      }
docs: Truncate the journal, removing all log files. Please note truncate
  requires the journal to be closed.
  
  @throws IOException
  @throws OpenJournalException