Android Utililty Methods Path to URL Convert

List of utility methods to do Path to URL Convert

Description

The list of methods to do Path to URL Convert are organized into topic(s).

Method

java.net.URLgetResource(String strName)
Return resource from local file, if false then search from classpath
try {
    File fl = new File(strName);
    if (fl.exists() && fl.isFile())
        return fl.toURI().toURL();
} catch (Exception e) {
if (!strName.startsWith("/"))
    return FileUtil.class.getResource("/" + strName);
...