SuccessWhale.java 文件源码

java
阅读 30 收藏 0 点赞 0 评论 0

项目:Onosendai 作者:
@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);
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号