Files
rr3-apk/decompiled/sources/okhttp3/Protocol.java
Daniel Elliott f9d20bb3fc Add decompiled APK source code (JADX)
- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-18 14:52:23 -08:00

53 lines
1.3 KiB
Java

package okhttp3;
import java.io.IOException;
/* loaded from: classes5.dex */
public enum Protocol {
HTTP_1_0("http/1.0"),
HTTP_1_1("http/1.1"),
SPDY_3("spdy/3.1"),
HTTP_2("h2"),
H2_PRIOR_KNOWLEDGE("h2_prior_knowledge"),
QUIC("quic");
private final String protocol;
@Override // java.lang.Enum
public String toString() {
return this.protocol;
}
Protocol(String str) {
this.protocol = str;
}
public static Protocol get(String str) throws IOException {
Protocol protocol = HTTP_1_0;
if (str.equals(protocol.protocol)) {
return protocol;
}
Protocol protocol2 = HTTP_1_1;
if (str.equals(protocol2.protocol)) {
return protocol2;
}
Protocol protocol3 = H2_PRIOR_KNOWLEDGE;
if (str.equals(protocol3.protocol)) {
return protocol3;
}
Protocol protocol4 = HTTP_2;
if (str.equals(protocol4.protocol)) {
return protocol4;
}
Protocol protocol5 = SPDY_3;
if (str.equals(protocol5.protocol)) {
return protocol5;
}
Protocol protocol6 = QUIC;
if (str.equals(protocol6.protocol)) {
return protocol6;
}
throw new IOException("Unexpected protocol: " + str);
}
}