code: public static File copyFile(InputStream is, boolean deleteOnExit) throws IOException {
  		File f = File.createTempFile("php", ".php");
  		if (deleteOnExit) {
  			f.deleteOnExit();
  		}
  		FileWriter fw = new FileWriter(f);
  		copyFile(new BufferedReader(new InputStreamReader(is)), new BufferedWriter(fw));
  		is.close();
  		fw.close();
  		return f;
  	}
docs: <p>copyFile.</p>
  
  @param is a {@link java.io.InputStream} object.
  @param deleteOnExit a boolean.
  @return a {@link java.io.File} object.
  @throws java.io.IOException if any.