public static String decode(String file, String ref) {
        StringBuffer buf = new StringBuffer();
        StringTokenizer tokenizer = new StringTokenizer(file, "/", true); //$NON-NLS-1$

        while (tokenizer.hasMoreTokens()) {
            String token = tokenizer.nextToken();
            if (token.equals("/")) { //$NON-NLS-1$
                buf.append(token);
            } else {
                buf.append(decodeSegment(token));
            }
        }

        if (ref != null) {
            buf.append('#');
            buf.append(decodeSegment(ref));
        }

        return buf.toString();
    }
public static String decode(String file, String ref) {
        StringBuffer buf = new StringBuffer();
        StringTokenizer tokenizer = new StringTokenizer(file, "/", true); 

        while (tokenizer.hasMoreTokens()) {
            String token = tokenizer.nextToken();
            if (token.equals("/")) { 
                buf.append(token);
            } else {
                buf.append(decodeSegment(token));
            }
        }

        if (ref != null) {
            buf.append('#');
            buf.append(decodeSegment(ref));
        }

        return buf.toString();
    }
public static String decode ( String file , String ref ) { StringBuffer buf = new StringBuffer ( ) ; StringTokenizer tokenizer = new StringTokenizer ( file , "/" , true ) ; //$NON-NLS-1$ while ( tokenizer . hasMoreTokens ( ) ) { String token = tokenizer . nextToken ( ) ; if ( token . equals ( "/" ) ) { //$NON-NLS-1$ buf . append ( token ) ; } else { buf . append ( decodeSegment ( token ) ) ; } } if ( ref != null ) { buf . append ( ' ' ) ; buf . append ( decodeSegment ( ref ) ) ; } return buf . toString ( ) ; }
Decodes the file and reference parts of a <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 file and reference parts of a
<code>URL</code> from an <code>ASCII</code> readable
<code>URL</code> that is safe for transport
Decodes the file and reference parts of a <code > URL< / code > from an <code > ASCII< / code > readable <code > URL< / code > that is safe for transport . Returns the result .