Rabbit-R1/original r1/java/sources/okhttp3/internal/http2/Header.java
2024-05-21 17:08:36 -04:00

95 lines
5.3 KiB
Java

package okhttp3.internal.http2;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
import okio.ByteString;
/* compiled from: Header.kt */
@Metadata(bv = {1, 0, 3}, d1 = {"\u0000*\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\b\n\u0002\b\u0004\n\u0002\u0010\u000b\n\u0002\b\u0005\b\u0086\b\u0018\u0000 \u00132\u00020\u0001:\u0001\u0013B\u0017\b\u0016\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0003¢\u0006\u0002\u0010\u0005B\u0017\b\u0016\u0012\u0006\u0010\u0002\u001a\u00020\u0006\u0012\u0006\u0010\u0004\u001a\u00020\u0003¢\u0006\u0002\u0010\u0007B\u0015\u0012\u0006\u0010\u0002\u001a\u00020\u0006\u0012\u0006\u0010\u0004\u001a\u00020\u0006¢\u0006\u0002\u0010\bJ\t\u0010\u000b\u001a\u00020\u0006HÆ\u0003J\t\u0010\f\u001a\u00020\u0006HÆ\u0003J\u001d\u0010\r\u001a\u00020\u00002\b\b\u0002\u0010\u0002\u001a\u00020\u00062\b\b\u0002\u0010\u0004\u001a\u00020\u0006HÆ\u0001J\u0013\u0010\u000e\u001a\u00020\u000f2\b\u0010\u0010\u001a\u0004\u0018\u00010\u0001HÖ\u0003J\t\u0010\u0011\u001a\u00020\nHÖ\u0001J\b\u0010\u0012\u001a\u00020\u0003H\u0016R\u0010\u0010\t\u001a\u00020\n8\u0006X\u0087\u0004¢\u0006\u0002\n\u0000R\u0010\u0010\u0002\u001a\u00020\u00068\u0006X\u0087\u0004¢\u0006\u0002\n\u0000R\u0010\u0010\u0004\u001a\u00020\u00068\u0006X\u0087\u0004¢\u0006\u0002\n\u0000¨\u0006\u0014"}, d2 = {"Lokhttp3/internal/http2/Header;", "", "name", "", "value", "(Ljava/lang/String;Ljava/lang/String;)V", "Lokio/ByteString;", "(Lokio/ByteString;Ljava/lang/String;)V", "(Lokio/ByteString;Lokio/ByteString;)V", "hpackSize", "", "component1", "component2", "copy", "equals", "", "other", "hashCode", "toString", "Companion", "okhttp"}, k = 1, mv = {1, 4, 0})
/* loaded from: classes3.dex */
public final /* data */ class Header {
public final int hpackSize;
public final ByteString name;
public final ByteString value;
public static final ByteString PSEUDO_PREFIX = ByteString.INSTANCE.encodeUtf8(":");
public static final String RESPONSE_STATUS_UTF8 = ":status";
public static final ByteString RESPONSE_STATUS = ByteString.INSTANCE.encodeUtf8(RESPONSE_STATUS_UTF8);
public static final String TARGET_METHOD_UTF8 = ":method";
public static final ByteString TARGET_METHOD = ByteString.INSTANCE.encodeUtf8(TARGET_METHOD_UTF8);
public static final String TARGET_PATH_UTF8 = ":path";
public static final ByteString TARGET_PATH = ByteString.INSTANCE.encodeUtf8(TARGET_PATH_UTF8);
public static final String TARGET_SCHEME_UTF8 = ":scheme";
public static final ByteString TARGET_SCHEME = ByteString.INSTANCE.encodeUtf8(TARGET_SCHEME_UTF8);
public static final String TARGET_AUTHORITY_UTF8 = ":authority";
public static final ByteString TARGET_AUTHORITY = ByteString.INSTANCE.encodeUtf8(TARGET_AUTHORITY_UTF8);
public static /* synthetic */ Header copy$default(Header header, ByteString byteString, ByteString byteString2, int i, Object obj) {
if ((i & 1) != 0) {
byteString = header.name;
}
if ((i & 2) != 0) {
byteString2 = header.value;
}
return header.copy(byteString, byteString2);
}
/* renamed from: component1, reason: from getter */
public final ByteString getName() {
return this.name;
}
/* renamed from: component2, reason: from getter */
public final ByteString getValue() {
return this.value;
}
public final Header copy(ByteString name, ByteString value) {
Intrinsics.checkNotNullParameter(name, "name");
Intrinsics.checkNotNullParameter(value, "value");
return new Header(name, value);
}
public boolean equals(Object other) {
if (this == other) {
return true;
}
if (!(other instanceof Header)) {
return false;
}
Header header = (Header) other;
return Intrinsics.areEqual(this.name, header.name) && Intrinsics.areEqual(this.value, header.value);
}
public int hashCode() {
ByteString byteString = this.name;
int hashCode = (byteString != null ? byteString.hashCode() : 0) * 31;
ByteString byteString2 = this.value;
return hashCode + (byteString2 != null ? byteString2.hashCode() : 0);
}
public Header(ByteString name, ByteString value) {
Intrinsics.checkNotNullParameter(name, "name");
Intrinsics.checkNotNullParameter(value, "value");
this.name = name;
this.value = value;
this.hpackSize = name.size() + 32 + value.size();
}
/* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
public Header(String name, String value) {
this(ByteString.INSTANCE.encodeUtf8(name), ByteString.INSTANCE.encodeUtf8(value));
Intrinsics.checkNotNullParameter(name, "name");
Intrinsics.checkNotNullParameter(value, "value");
}
/* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
public Header(ByteString name, String value) {
this(name, ByteString.INSTANCE.encodeUtf8(value));
Intrinsics.checkNotNullParameter(name, "name");
Intrinsics.checkNotNullParameter(value, "value");
}
public String toString() {
return this.name.utf8() + ": " + this.value.utf8();
}
}