code: public void openFile(String repositoryHash, String filename)
              throws JournalException {
          if (journalFile != null) {
              throw logAndGetException("Attempting to open file '" + filename
                      + "' when file '" + journalFile.getName()
                      + "' has not been closed.");
          }
  
          try {
              journalFile = new TransportOutputFile(directory, filename);
              writer = journalFile.open();
          } catch (IOException e) {
              throw logAndGetException("Problem opening" + filename + "'", e);
          }
  
          currentRepositoryHash = repositoryHash;
          itemIndex = 0;
          logger.debug("opened file '" + filename + "', hash is '" + repositoryHash
                  + "'");
      }
docs: Request to open a file. Check that:
  <ul>
  <li>a file is not already open,</li>
  <li>we can create a {@link TransportOutputFile}, and open a
  {@link Writer} on it.</li>
  </ul>