Android URL Decode decodeURL(String value)

Here you can find the source of decodeURL(String value)

Description

decode URL

Declaration

public static String decodeURL(String value)
            throws UnsupportedEncodingException 

Method Source Code

//package com.java2s;

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

public class Main {
    public static String decodeURL(String value)
            throws UnsupportedEncodingException {
        if (!isEmpty(value)) {
            return URLDecoder.decode(value, "UTF-8");
        }/*ww w .  ja  va2 s. c  om*/
        return "";
    }

    public static boolean isEmpty(String value) {
        return value == null || value.trim().equals("")
                || value.length() == 0;
    }
}

Related

  1. decodeUrl(String url)
  2. decode(String url)
  3. decode(String url)
  4. decodeUri(Context ctx, Uri selectedImage)
  5. urlDecode(String in)
  6. decode(final String content, final String encoding)
  7. decode(String s)