/**
*
* @see: http://weblogs.java.net/blog/kohsuke/archive/2007/04/how_to_convert.html
* @param url
* @return
*/
public static File fileFromUrl(URL url)
{
if (url == null) throw new IllegalArgumentException("Null url object");
File f;
try
{
f = new File(url.toURI());
}
catch (URISyntaxException e)
{
f = new File(url.getPath());
}
return f;
}