Android Utililty Methods URL Decode

List of utility methods to do URL Decode

Description

The list of methods to do URL Decode are organized into topic(s).

Method

StringdecodeUrl(String url)
Decodes the specified URL as per RFC 3986, i.e.
String decoded = url;
if (url != null && url.indexOf('%') >= 0) {
    int n = url.length();
    StringBuffer buffer = new StringBuffer();
    ByteBuffer bytes = ByteBuffer.allocate(n);
    for (int i = 0; i < n;) {
        if (url.charAt(i) == '%') {
            try {
...
Stringdecode(String url)
decode
return URLDecoder.decode(url);
Stringdecode(String url)
decode
String str = new String();
try {
    str = URLDecoder.decode(url, HTTP.UTF_8);
} catch (UnsupportedEncodingException e) {
    e.printStackTrace();
return str;
StringdecodeURL(String value)
decode URL
if (!isEmpty(value)) {
    return URLDecoder.decode(value, "UTF-8");
return "";
BitmapdecodeUri(Context ctx, Uri selectedImage)
decode Uri
BitmapFactory.Options o = new BitmapFactory.Options();
o.inJustDecodeBounds = true;
BitmapFactory.decodeStream(ctx.getContentResolver()
        .openInputStream(selectedImage), null, o);
final int REQUIRED_SIZE = 240;
int width_tmp = o.outWidth, height_tmp = o.outHeight;
int scale = 1;
while (true) {
...
StringurlDecode(String in)
url Decode
return URLDecoder.decode(in);
Stringdecode(final String content, final String encoding)
decode
try {
    return URLDecoder.decode(content, encoding != null ? encoding
            : DEFAULT_CONTENT_CHARSET);
} catch (UnsupportedEncodingException problem) {
    throw new IllegalArgumentException(problem);
Stringdecode(String s)
decode
if (s == null) {
    return "";
try {
    return URLDecoder.decode(s, "UTF-8");
} catch (UnsupportedEncodingException e) {
    throw new RuntimeException(e.getMessage(), e);
BundledecodeUrl(String s)
decode Url
Bundle params = new Bundle();
if (s != null) {
    params.putString("url", s);
    String array[] = s.split("&");
    for (String parameter : array) {
        String v[] = parameter.split("=");
        if (v.length > 1) {
            params.putString(v[0], URLDecoder.decode(v[1]));
...
BundledecodeUrl(String s)
decode Url
Bundle params = new Bundle();
try {
    if (s != null) {
        String array[] = s.split("&");
        for (String parameter : array) {
            String v[] = parameter.split("=");
            params.putString(URLDecoder.decode(v[0], "UTF-8"),
                    URLDecoder.decode(v[1], "UTF-8"));
...