@Override
public List<String> handleResponse (final HttpResponse response) throws ClientProtocolException, IOException {
checkReponseCode(response);
final String raw = IoHelper.toString(AndroidHttpClient.getUngzippedContent(response.getEntity()));
try {
final JSONArray arr = ((JSONObject) new JSONTokener(raw).nextValue()).getJSONArray("bannedphrases");
final List<String> ret = new ArrayList<String>();
for (int i = 0; i < arr.length(); i++) {
ret.add(arr.getString(i));
}
return ret;
}
catch (final JSONException e) {
throw new IOException("Failed to parse response: " + e.toString(), e);
}
}
SuccessWhale.java 文件源码
java
阅读 30
收藏 0
点赞 0
评论 0
项目:Onosendai
作者:
评论列表
文章目录