Java URI Decode uriDecode(String encoded)

Here you can find the source of uriDecode(String encoded)

Description

uri Decode

License

Open Source License

Declaration

public static String uriDecode(String encoded) throws UnsupportedEncodingException 

Method Source Code

//package com.java2s;
/* --- BEGIN COPYRIGHT BLOCK ---
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation;
 * version 2.1 of the License./*from  w w  w  .  j  a  v a 2 s  .  com*/
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA  02110-1301  USA
 *
 * Copyright (C) 2007 Red Hat, Inc.
 * All rights reserved.
 * --- END COPYRIGHT BLOCK ---
 */

import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;

public class Main {
    public static String uriDecode(String encoded) throws UnsupportedEncodingException {

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

Related

  1. decodeUri(String string)
  2. decodeURI(String uri)
  3. decodeURI(URI uri)
  4. decodeURIComponent(String s, String charset)
  5. decodeURItoMap(String URIstring)
  6. uriDecodePath(String path)
  7. uriDecoding(String str)