4399游戏盒 v7.2.1.31版本的 MD5 值为:951717f45e3fda95c8a358caf4ca93e1
以下内容为反编译后的 LoadDnsProvider.java 源代码,内容仅作参考
package com.download.dns;
import com.download.okhttp.OkHttpHelper;
import com.framework.utils.JSONUtils;
import java.io.IOException;
import okhttp3.Call;
import okhttp3.Callback;
import okhttp3.Request;
import okhttp3.Response;
import org.json.JSONObject;
public class LoadDnsProvider {
private DnsModel vC;
public DnsModel getDnsModel() {
return this.vC;
}
protected void parseResponseData(JSONObject jSONObject) {
this.vC = new DnsModel();
this.vC.parse(jSONObject);
}
public void loadData(final Callback callback) {
OkHttpHelper.getInstance().newCall(new Request.Builder().get().url("https://who.wangsu.com/?key=c4399&form=json").build()).enqueue(new Callback() {
@Override
public void onFailure(Call call, IOException iOException) {
callback.onFailure(call, iOException);
}
@Override
public void onResponse(Call call, Response response) throws IOException {
LoadDnsProvider.this.parseResponseData(JSONUtils.parseJSONObjectFromString(response.body().string()));
callback.onResponse(call, response);
}
});
}
}