
org.frameworkset.spi.remote.http.BaseResponseHandler Maven / Gradle / Ivy
package org.frameworkset.spi.remote.http;
import com.frameworkset.util.SimpleStringUtil;
import org.apache.http.HttpEntity;
import java.io.IOException;
import java.io.InputStream;
public abstract class BaseResponseHandler extends StatusResponseHandler {
protected T converJson(HttpEntity entity,Class clazz) throws IOException {
InputStream inputStream = null;
try {
inputStream = entity.getContent();
return SimpleStringUtil.json2Object(inputStream, clazz);
}
finally {
inputStream.close();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy