code: public static RandomAccessFile createTemporaryFile
          (String prefix, String suffix, File directory) throws IOException {
  
          File file = File.createTempFile(prefix, suffix, directory);
          file.deleteOnExit();
          return new TemporaryFile(file);
      }
docs: Creates a new writable temporary file that is deleted when closed,
  finalized, or when the system exits.
  
  @see File#createTempFile