private static String uencode ( String prefix ) { if ( prefix != null && prefix . startsWith ( "file:" ) ) { StringTokenizer tokens = new StringTokenizer ( prefix , "/\\:" , true ) ; StringBuilder stringBuilder = new StringBuilder ( ) ; while ( tokens . hasMoreElements ( ) ) { String token = tokens . nextToken ( ) ; if ( "/" . equals ( token ) || "\\" . equals ( token ) || ":" . equals ( token ) ) { stringBuilder . append ( token ) ; } else { try { stringBuilder . append ( URLEncoder . encode ( token , "UTF-8" ) ) ; } catch ( java . io . UnsupportedEncodingException ex ) { } } } return stringBuilder . toString ( ) ; } else { return prefix ; } }
END PWC 6386258