drools-eclipse/org.guvnor.eclipse.webdav/src/interface/org/eclipse/webdav/internal/utils/URLDecoder.java
public static String decode(String url) {
        try {
            return decode(new URL(url)).toString();
        } catch (MalformedURLException e) {
            // ignore or log?
        }

        String file;
        String ref = null;

        int lastSlashIndex = url.lastIndexOf('/');
        int lastHashIndex = url.lastIndexOf('#');
        if ((lastHashIndex - lastSlashIndex > 1) && lastHashIndex < url.length() - 1) {
            file = url.substring(0, lastHashIndex);
            ref = url.substring(lastHashIndex + 1, url.length());
        } else {
            file = url;
        }

        return decode(file, ref);
    }
public static String decode(String url) {
        try {
            return decode(new URL(url)).toString();
        } catch (MalformedURLException e) {
            // ignore or log?
        }

        String file;
        String ref = null;

        int lastSlashIndex = url.lastIndexOf('/');
        int lastHashIndex = url.lastIndexOf('#');
        if ((lastHashIndex - lastSlashIndex > 1) && lastHashIndex < url.length() - 1) {
            file = url.substring(0, lastHashIndex);
            ref = url.substring(lastHashIndex + 1, url.length());
        } else {
            file = url;
        }

        return decode(file, ref);
    }
Decodes the given <code>URL</code> from an <code>ASCII</code>
readable <code>URL</code> that is safe for transport. Returns the
result.

@return the result of decoding the given <code>URL</code> from an
<code>ASCII</code> readable <code>URL</code> that is safe for
transport