use of org.aisen.weibo.sina.sinasdk.bean.BaseSinaBean in project AisenWeiBo by wangdan.
the class HttpsUtility method parseResponse.
@Override
protected <T> T parseResponse(String resultStr, Class<T> responseCls) throws TaskException {
T result = super.parseResponse(resultStr, responseCls);
if (result instanceof OfflineService.OfflineLength) {
OfflineService.OfflineLength iLength = (OfflineService.OfflineLength) result;
iLength.setLength(resultStr.length());
}
if (result instanceof BaseSinaBean) {
BaseSinaBean sinaBean = (BaseSinaBean) result;
if (sinaBean.getError_code() > 0 && !TextUtils.isEmpty(sinaBean.getError())) {
throw new TaskException(String.valueOf(sinaBean.getError_code()), sinaBean.getError());
}
}
return result;
}
Aggregations