urlencodedutils被什么代替

2024-11-20 17:13:53
推荐回答(1个)
回答1:

android api22以前通常这样写:
EncodingUtils.getString(buffer,"UTF-8");

后来org.apache.http.util包被废弃了,简单粗暴就可以用下面的方法这样写:

new String(buffer,"UTF-8");