code: private FileWriter createTempFile(File tempfile) throws IOException,
              JournalException {
          boolean created = tempfile.createNewFile();
          if (!created) {
              throw new JournalException("Unable to create file '"
                      + tempfile.getPath() + "'.");
          }
          return new FileWriter(tempfile);
      }
docs: Create and open the temporary file.