new URI(strUrl);
new URL(strUrl);
}
catch (URISyntaxException excURISyntax)
{
validityChanged(new GfrEvtValidityChanged(false, "Wrong Syntax URL."));
return false;
}
catch (MalformedURLException excMalformedURL)
{
validityChanged(new GfrEvtValidityChanged(false, "Malformed URL."));
return false;
}
catch (Exception exc)
{
validityChanged(new GfrEvtValidityChanged(false, "Please enter a valid URL."));
return false;
}
for (int i=0; i<this._strsFileExtension_.length; i++)
{
if (strUrl.toLowerCase().endsWith(this._strsFileExtension_[i]))
return true;
}
String strAllowedExtension = "";
for (int i=0; i<this._strsFileExtension_.length; i++)
strAllowedExtension += this._strsFileExtension_[i] + " ";
validityChanged(new GfrEvtValidityChanged(false, "Wrong file extension, supported extensions:" + strAllowedExtension));
return false;
}