code: public static String getExtension(URL url)
    {
      return url != null ? getExtension(url.getPath()) : null;
    }
docs: Get extension of the file denoted by given URL or empty string if not extension. Returned extension does not
  contain dot separator, that is, <code>htm</code> not <code>.htm</code>. Returns null if <code>url</code> parameter
  is null.
  
  @param url the URL of file to return extension.
  @return file extension or empty string or null if <code>url</code> parameter is null.