Android examples for Network:URL
decode a String content with URLDecoder
//package com.java2s; import java.io.IOException; import java.net.URLDecoder; import android.text.TextUtils; public class Main { public static final String DEFAULT_CHARSET = "UTF-8"; public static String decode(String value) { return decode(value, DEFAULT_CHARSET); }//from w w w . j av a 2 s. co m public static String decode(String value, String charset) { String result = null; if (!TextUtils.isEmpty(value)) { try { result = URLDecoder.decode(value, charset); } catch (IOException e) { throw new RuntimeException(e); } } return result; } }