url decode

 

public class UrlTools {

static String url = "http://localhost:8080/api/flows?filter=&limit=10&offset=0&query=";
public static void main(String[] args) {
System.out.println(decodeUrl(url));
}

public static String decodeUrl(String url) {
try {
return java.net.URLDecoder.decode(url, "UTF-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
return null;
}
}
posted @ 2016-05-17 21:15  一块橡皮  阅读(284)  评论(0编辑  收藏  举报