public static final String decode(String s,String enc) throws MalformedURLException, UnsupportedEncodingException {
  try {
    return URLDecoder.decode(s,enc);
  }
 catch (  IllegalArgumentException iae) {
    MalformedURLException mue=new MalformedURLException("Invalid URI encoding: " + s);
    mue.initCause(iae);
    throw mue;
  }
}

public static final String decode ( String s , String enc ) throws MalformedURLException , UnsupportedEncodingException { try { return URLDecoder . decode ( s , enc ) ; } catch ( IllegalArgumentException iae ) { MalformedURLException mue = new MalformedURLException ( "Invalid URI encoding: " + s ) ; mue . initCause ( iae ) ; throw mue ; } }
decode a uri string ( according to rfc 2396 ) . three - character sequences ' % xy ' , where ' xy ' is the two - digit hexadecimal representation of the lower 8 - bits of a character , are decoded into the character itself . the string is subsequently converted using the specified encoding
