Java URI Decode decodeURI(String uri)

Here you can find the source of decodeURI(String uri)

Description

URLDecoder.decode wrapping

License

Open Source License

Parameter

Parameter Description
uri -

Exception

Parameter Description
UnsupportedEncodingException -

Return

-

Declaration

public static String decodeURI(String uri) throws UnsupportedEncodingException 

Method Source Code


//package com.java2s;
/*/*from   www  .  j  a  v a  2 s .  c  o m*/
 * CommonUtil.java 
 *
 * Copyright 2007 NHN Corp. All rights Reserved. 
 * NHN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */

import java.io.UnsupportedEncodingException;

import java.net.URLDecoder;

public class Main {
    /**
     * URLDecoder.decode wrapping
     * @param uri -
     * @return -
     * @throws UnsupportedEncodingException -
     */
    public static String decodeURI(String uri) throws UnsupportedEncodingException {
        if (uri == null) {
            return null;
        }

        return URLDecoder.decode(uri, "UTF-8");
    }
}

Related

  1. decodeURI(CharSequence uriCharSequence, String charset)
  2. decodeURI(java.net.URI uri)
  3. decodeURI(String s)
  4. decodeURI(String str, boolean fullUri)
  5. decodeUri(String string)
  6. decodeURI(URI uri)
  7. decodeURIComponent(String s, String charset)
  8. decodeURItoMap(String URIstring)
  9. decode(String encodedURI)