Java URI Decode decodeUri(String string)

Here you can find the source of decodeUri(String string)

Description

Decodes the given URI-encoded, UTF-8 string .

License

Open Source License

Declaration

public static String decodeUri(String string) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.io.UnsupportedEncodingException;

import java.net.URLDecoder;

public class Main {
    /** Decodes the given URI-encoded, UTF-8 {@code string}. */
    public static String decodeUri(String string) {
        if (string == null) {
            return null;
        }//  ww w.j ava2  s  . c  o m
        try {
            return URLDecoder.decode(string, "UTF-8");
        } catch (UnsupportedEncodingException ex) {
            throw new IllegalStateException(ex);
        }
    }
}

Related

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