// Path: src/main/java/org/yetiz/lib/acd/exception/BadContentException.java
// public class BadContentException extends RuntimeException {
// 	/**
// 	 * Constructs a new runtime exception with {@code null} as its
// 	 * detail message.  The cause is not initialized, and may subsequently be
// 	 * initialized by a call to {@link #initCause}.
// 	 */
// 	public BadContentException() {
// 		super("Data can't convert to JSON type.");
// 		Log.e(getMessage());
// 	}
// 
// 	public BadContentException(String message) {
// 		super(message);
// 		Log.e(getMessage());
// 	}
// }


import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.ning.http.client.RequestBuilder;
import com.ning.http.client.Response;
import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
import org.yetiz.lib.acd.exception.BadContentException;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.Date;
package org.yetiz.lib.acd;



/**
 * Created by yeti on 2015/4/13.
 */
public class Utils {
	public static JsonObject convertBodyToJson(Response response) {
		try {
			return ((JsonObject) new JsonParser().parse(response.getResponseBody("utf-8")));
		} catch (IOException e) {
// Path: src/main/java/org/yetiz/lib/acd/exception/BadContentException.java
// public class BadContentException extends RuntimeException {
// 	/**
// 	 * Constructs a new runtime exception with {@code null} as its
// 	 * detail message.  The cause is not initialized, and may subsequently be
// 	 * initialized by a call to {@link #initCause}.
// 	 */
// 	public BadContentException() {
// 		super("Data can't convert to JSON type.");
// 		Log.e(getMessage());
// 	}
// 
// 	public BadContentException(String message) {
// 		super(message);
// 		Log.e(getMessage());
// 	}
// }


// Path: src/main/java/org/yetiz/lib/acd/Utils.java
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.ning.http.client.RequestBuilder;
import com.ning.http.client.Response;
import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
import org.yetiz.lib.acd.exception.BadContentException;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.Date;

package org.yetiz.lib.acd;



/**
 * Created by yeti on 2015/4/13.
 */
public class Utils {
	public static JsonObject convertBodyToJson(Response response) {
		try {
			return ((JsonObject) new JsonParser().parse(response.getResponseBody("utf-8")));
		} catch (IOException e) {
			throw new BadContentException();