Add a new library template to Java client: okhttp-gson

which uses OkHttp as HTTP library and Gson as JSON processing library
This commit is contained in:
xhh
2015-08-31 18:42:09 +08:00
parent 8114c416b9
commit 3c84847adb
13 changed files with 1311 additions and 13 deletions

View File

@@ -39,4 +39,13 @@ public class StringUtil {
}
return out.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
public static String toIndentedString(Object o) {
if (o == null) return "null";
return o.toString().replace("\n", "\n ");
}
}