what-the-bank/sources/okhttp3/repackaged/internal/framed/Header.java

61 lines
1.9 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package okhttp3.repackaged.internal.framed;
import o.C15183gjd;
import o.giP;
/* loaded from: classes6.dex */
public final class Header {
final int hpackSize;
public final giP name;
public final giP value;
public static final giP RESPONSE_STATUS = giP.b(okhttp3.internal.http2.Header.RESPONSE_STATUS_UTF8);
public static final giP TARGET_METHOD = giP.b(okhttp3.internal.http2.Header.TARGET_METHOD_UTF8);
public static final giP TARGET_PATH = giP.b(okhttp3.internal.http2.Header.TARGET_PATH_UTF8);
public static final giP TARGET_SCHEME = giP.b(okhttp3.internal.http2.Header.TARGET_SCHEME_UTF8);
public static final giP TARGET_AUTHORITY = giP.b(okhttp3.internal.http2.Header.TARGET_AUTHORITY_UTF8);
public static final giP TARGET_HOST = giP.b(":host");
public static final giP VERSION = giP.b(":version");
public Header(String str, String str2) {
this(giP.b(str), giP.b(str2));
}
public Header(giP gip, String str) {
this(gip, giP.b(str));
}
public Header(giP gip, giP gip2) {
this.name = gip;
this.value = gip2;
this.hpackSize = gip.d.length + 32 + gip2.d.length;
}
public final boolean equals(Object obj) {
if (!(obj instanceof Header)) {
return false;
}
Header header = (Header) obj;
return this.name.equals(header.name) && this.value.equals(header.value);
}
public final int hashCode() {
return ((this.name.hashCode() + 527) * 31) + this.value.hashCode();
}
public final String toString() {
giP gip = this.name;
String str = gip.c;
if (str == null) {
str = new String(gip.d, C15183gjd.e);
gip.c = str;
}
giP gip2 = this.value;
String str2 = gip2.c;
if (str2 == null) {
str2 = new String(gip2.d, C15183gjd.e);
gip2.c = str2;
}
return String.format("%s: %s", str, str2);
}
}