超媒网络 v3.0.0版本的 MD5 值为:e72248abb238993f421967424d9a9515
以下内容为反编译后的 bt3.java 源代码,内容仅作参考
package p.a.y.e.a.s.e.net;
import javax.annotation.Nullable;
import okhttp3.Headers;
import okhttp3.Protocol;
import okhttp3.Request;
import okhttp3.Response;
import okhttp3.ResponseBody;
public final class bt3<T> {
private final Response lite_do;
@Nullable
private final ResponseBody lite_for;
@Nullable
private final T lite_if;
private bt3(@Nullable Response response, @Nullable T t, ResponseBody responseBody) {
this.lite_do = response;
this.lite_if = t;
this.lite_for = responseBody;
}
public static <T> bt3<T> lite_else(@Nullable T t) {
return lite_long(t, new Response.Builder().code(200).message("OK").protocol(Protocol.HTTP_1_1).request(new Request.Builder().url("http://localhost/").build()).build());
}
public static <T> bt3<T> lite_for(int i, ResponseBody responseBody) {
if (i >= 400) {
return lite_int(responseBody, new Response.Builder().code(i).message("Response.error()").protocol(Protocol.HTTP_1_1).request(new Request.Builder().url("http://localhost/").build()).build());
}
throw new IllegalArgumentException(r5.lite_class("code < 400: ", i));
}
public static <T> bt3<T> lite_goto(@Nullable T t, Headers headers) {
et3.lite_if(headers, "headers == null");
return lite_long(t, new Response.Builder().code(200).message("OK").protocol(Protocol.HTTP_1_1).headers(headers).request(new Request.Builder().url("http://localhost/").build()).build());
}
public static <T> bt3<T> lite_int(ResponseBody responseBody, Response response) {
et3.lite_if(responseBody, "body == null");
et3.lite_if(response, "rawResponse == null");
if (response.isSuccessful()) {
throw new IllegalArgumentException("rawResponse should not be successful response");
}
return new bt3<>(response, null, responseBody);
}
public static <T> bt3<T> lite_long(@Nullable T t, Response response) {
et3.lite_if(response, "rawResponse == null");
if (response.isSuccessful()) {
return new bt3<>(response, t, null);
}
throw new IllegalArgumentException("rawResponse must be successful response");
}
public boolean lite_byte() {
return this.lite_do.isSuccessful();
}
public String lite_case() {
return this.lite_do.message();
}
public Response lite_char() {
return this.lite_do;
}
@Nullable
public T lite_do() {
return this.lite_if;
}
public int lite_if() {
return this.lite_do.code();
}
@Nullable
public ResponseBody lite_new() {
return this.lite_for;
}
public Headers lite_try() {
return this.lite_do.headers();
}
public String toString() {
return this.lite_do.toString();
}
}