code: public static File writeDataToTempFile(final String data, final String ext) {
  		try {
  			final File file = createTempFile(ext);
  			final PrintWriter out = new PrintWriter(new FileOutputStream(file));
  			out.print(data);
  //			out.flush();
  			out.close();
  //			file.deleteOnExit();
  			return file;
  		} catch (IOException e) {
  			JKExceptionUtil.handle(e);
  			return null;
  		}
  	}
docs: Write data to temp file.
  
  @param data String
  @param ext  the ext
  @return File