Android URL Decode decode(final String content, final String encoding)

Here you can find the source of decode(final String content, final String encoding)

Description

decode

Declaration

public static String decode(final String content, final String encoding) 

Method Source Code

//package com.java2s;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;

public class Main {
    /** Default charsets */
    public static final String DEFAULT_CONTENT_CHARSET = "ISO-8859-1";

    public static String decode(final String content, final String encoding) {
        try {//from   w ww. j  a  v a2 s. c om
            return URLDecoder.decode(content, encoding != null ? encoding
                    : DEFAULT_CONTENT_CHARSET);
        } catch (UnsupportedEncodingException problem) {
            throw new IllegalArgumentException(problem);
        }
    }
}

Related

  1. decode(String url)
  2. decode(String url)
  3. decodeURL(String value)
  4. decodeUri(Context ctx, Uri selectedImage)
  5. urlDecode(String in)
  6. decode(String s)
  7. decodeUrl(String s)
  8. decodeUrl(String s)
  9. decodeUrlFormEncoded(String data)