code: public static String decodeUri(String uri) {
      try {
        return URLDecoder.decode(uri, "UTF-8");
      } catch (UnsupportedEncodingException e) {
        // UTF-8 encoding guaranteed to be supported by JVM
        throw new RuntimeException(e);
      }
    }
docs: Percent-decodes a US-ASCII string into a Unicode string. UTF-8 encoding is used to determine
  what characters are represented by any consecutive sequences of the form "%<i>XX</i>".
  
  <p>This replaces each occurrence of '+' with a space, ' '. So this method should not be used
  for non application/x-www-form-urlencoded strings such as host and path.
  
  @param uri a percent-encoded US-ASCII string
  @return a Unicode string