code: private File createTemporaryFile(String filename) throws HelloSignException {
          String prefix = filename.substring(0, filename.indexOf("."));
          String postfix = filename.substring(filename.indexOf(".") + 1, filename.length());
          if (prefix == null || postfix == null) {
              throw new HelloSignException("Invalid file name: " + prefix + "." + postfix);
          }
          File f = null;
          try {
              f = File.createTempFile(prefix, "." + postfix);
          } catch (Exception ex) {
              throw new HelloSignException(ex);
          }
          return f;
      }
docs: Helper method to create a temporary file.
  
  @param filename String
  @return File temporary file handle
  @throws HelloSignException thrown if the file cannot be created