code: static synchronized File tempFile(HttpServerFileUpload upload) {
          String newpostfix;
          String diskFilename = new File(upload.filename()).getName();
          newpostfix = '_' + diskFilename;
          File tmpFile;
          try {
              if (baseDirectory == null) {
                  // create a temporary file
                  tmpFile = File.createTempFile(prefix, newpostfix);
              } else {
                  tmpFile = File.createTempFile(prefix, newpostfix, new File(
                          baseDirectory));
              }
              if (deleteOnExitTemporaryFile) {
                  tmpFile.deleteOnExit();
              }
              return tmpFile;
          } catch (IOException e) {
              // Really bad, can't create the tmp file.
              throw new IllegalStateException(e);
          }
  
      }
docs: Creates a temporary file.
  
  @return a new Temp File from getDiskFilename(), default prefix, postfix and baseDirectory