|
|
@@ -75,20 +75,23 @@ public class LogUtil {
|
|
|
}
|
|
|
|
|
|
public static void prinlnLongMsg(String TAG,String responseInfo){
|
|
|
- if (responseInfo.length() >=3000) {
|
|
|
- Log.v(TAG, "sb.length = " + responseInfo.length());
|
|
|
- int chunkCount = responseInfo.length() / 3000; // integer division
|
|
|
- for (int i = 0; i <= chunkCount; i++) {
|
|
|
- int max = 3000 * (i + 1);
|
|
|
- if (max >= responseInfo.length()) {
|
|
|
- Log.v(TAG, "【chunk " + i + " of " + chunkCount + "】:" + responseInfo.substring(3000 * i));
|
|
|
- } else {
|
|
|
- Log.v(TAG, "【chunk " + i + " of " + chunkCount + "】:" + responseInfo.substring(3000 * i, max));
|
|
|
+ if (responseInfo != null){
|
|
|
+ if (responseInfo.length() >=3000) {
|
|
|
+ Log.v(TAG, "sb.length = " + responseInfo.length());
|
|
|
+ int chunkCount = responseInfo.length() / 3000; // integer division
|
|
|
+ for (int i = 0; i <= chunkCount; i++) {
|
|
|
+ int max = 3000 * (i + 1);
|
|
|
+ if (max >= responseInfo.length()) {
|
|
|
+ Log.v(TAG, "【chunk " + i + " of " + chunkCount + "】:" + responseInfo.substring(3000 * i));
|
|
|
+ } else {
|
|
|
+ Log.v(TAG, "【chunk " + i + " of " + chunkCount + "】:" + responseInfo.substring(3000 * i, max));
|
|
|
+ }
|
|
|
}
|
|
|
+ } else {
|
|
|
+ Log.v(TAG, "sb.length = " + responseInfo.length());
|
|
|
+ Log.v(TAG, responseInfo.toString());
|
|
|
}
|
|
|
- } else {
|
|
|
- Log.v(TAG, "sb.length = " + responseInfo.length());
|
|
|
- Log.v(TAG, responseInfo.toString());
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
}
|