340 lines
8.1 KiB
Smali
340 lines
8.1 KiB
Smali
.class public final Lokhttp3/internal/http/StatusLine$Companion;
|
|
.super Ljava/lang/Object;
|
|
.source "StatusLine.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lokhttp3/internal/http/StatusLine;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x19
|
|
name = "Companion"
|
|
.end annotation
|
|
|
|
.annotation runtime Lkotlin/Metadata;
|
|
bv = {
|
|
0x1,
|
|
0x0,
|
|
0x3
|
|
}
|
|
d1 = {
|
|
"\u0000(\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0008\u0002\n\u0002\u0010\u0008\n\u0002\u0008\u0004\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0010\u000e\n\u0000\u0008\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\u0008\u0002\u00a2\u0006\u0002\u0010\u0002J\u000e\u0010\u0008\u001a\u00020\t2\u0006\u0010\n\u001a\u00020\u000bJ\u000e\u0010\u000c\u001a\u00020\t2\u0006\u0010\r\u001a\u00020\u000eR\u000e\u0010\u0003\u001a\u00020\u0004X\u0086T\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0005\u001a\u00020\u0004X\u0086T\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0006\u001a\u00020\u0004X\u0086T\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0007\u001a\u00020\u0004X\u0086T\u00a2\u0006\u0002\n\u0000\u00a8\u0006\u000f"
|
|
}
|
|
d2 = {
|
|
"Lokhttp3/internal/http/StatusLine$Companion;",
|
|
"",
|
|
"()V",
|
|
"HTTP_CONTINUE",
|
|
"",
|
|
"HTTP_MISDIRECTED_REQUEST",
|
|
"HTTP_PERM_REDIRECT",
|
|
"HTTP_TEMP_REDIRECT",
|
|
"get",
|
|
"Lokhttp3/internal/http/StatusLine;",
|
|
"response",
|
|
"Lokhttp3/Response;",
|
|
"parse",
|
|
"statusLine",
|
|
"",
|
|
"okhttp"
|
|
}
|
|
k = 0x1
|
|
mv = {
|
|
0x1,
|
|
0x4,
|
|
0x0
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# direct methods
|
|
.method private constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public synthetic constructor <init>(Lkotlin/jvm/internal/u;)V
|
|
.locals 0
|
|
|
|
.line 2
|
|
invoke-direct {p0}, Lokhttp3/internal/http/StatusLine$Companion;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final get(Lokhttp3/Response;)Lokhttp3/internal/http/StatusLine;
|
|
.locals 3
|
|
.param p1 # Lokhttp3/Response;
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
|
|
const-string v0, "response"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/f0;->p(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 1
|
|
new-instance v0, Lokhttp3/internal/http/StatusLine;
|
|
|
|
invoke-virtual {p1}, Lokhttp3/Response;->protocol()Lokhttp3/Protocol;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {p1}, Lokhttp3/Response;->code()I
|
|
|
|
move-result v2
|
|
|
|
invoke-virtual {p1}, Lokhttp3/Response;->message()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {v0, v1, v2, p1}, Lokhttp3/internal/http/StatusLine;-><init>(Lokhttp3/Protocol;ILjava/lang/String;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final parse(Ljava/lang/String;)Lokhttp3/internal/http/StatusLine;
|
|
.locals 8
|
|
.param p1 # Ljava/lang/String;
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
|
|
const-string v0, "statusLine"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/f0;->p(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "HTTP/1."
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/4 v2, 0x2
|
|
|
|
const/4 v3, 0x0
|
|
|
|
.line 1
|
|
invoke-static {p1, v0, v1, v2, v3}, Lkotlin/text/u;->u2(Ljava/lang/String;Ljava/lang/String;ZILjava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
const/16 v4, 0x20
|
|
|
|
const/4 v5, 0x4
|
|
|
|
const/16 v6, 0x9
|
|
|
|
const-string v7, "Unexpected status line: "
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
.line 2
|
|
invoke-virtual {p1}, Ljava/lang/String;->length()I
|
|
|
|
move-result v0
|
|
|
|
if-lt v0, v6, :cond_2
|
|
|
|
const/16 v0, 0x8
|
|
|
|
invoke-virtual {p1, v0}, Ljava/lang/String;->charAt(I)C
|
|
|
|
move-result v0
|
|
|
|
if-ne v0, v4, :cond_2
|
|
|
|
const/4 v0, 0x7
|
|
|
|
.line 3
|
|
invoke-virtual {p1, v0}, Ljava/lang/String;->charAt(I)C
|
|
|
|
move-result v0
|
|
|
|
add-int/lit8 v0, v0, -0x30
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
.line 4
|
|
sget-object v0, Lokhttp3/Protocol;->HTTP_1_0:Lokhttp3/Protocol;
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v1, 0x1
|
|
|
|
if-ne v0, v1, :cond_1
|
|
|
|
.line 5
|
|
sget-object v0, Lokhttp3/Protocol;->HTTP_1_1:Lokhttp3/Protocol;
|
|
|
|
goto :goto_0
|
|
|
|
.line 6
|
|
:cond_1
|
|
new-instance v0, Ljava/net/ProtocolException;
|
|
|
|
invoke-static {v7, p1}, Lc/g;->a(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {v0, p1}, Ljava/net/ProtocolException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
.line 7
|
|
:cond_2
|
|
new-instance v0, Ljava/net/ProtocolException;
|
|
|
|
invoke-static {v7, p1}, Lc/g;->a(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {v0, p1}, Ljava/net/ProtocolException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_3
|
|
const-string v0, "ICY "
|
|
|
|
.line 8
|
|
invoke-static {p1, v0, v1, v2, v3}, Lkotlin/text/u;->u2(Ljava/lang/String;Ljava/lang/String;ZILjava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_7
|
|
|
|
.line 9
|
|
sget-object v0, Lokhttp3/Protocol;->HTTP_1_0:Lokhttp3/Protocol;
|
|
|
|
move v6, v5
|
|
|
|
.line 10
|
|
:goto_0
|
|
invoke-virtual {p1}, Ljava/lang/String;->length()I
|
|
|
|
move-result v1
|
|
|
|
add-int/lit8 v2, v6, 0x3
|
|
|
|
if-lt v1, v2, :cond_6
|
|
|
|
.line 11
|
|
:try_start_0
|
|
invoke-virtual {p1, v6, v2}, Ljava/lang/String;->substring(II)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v3, "(this as java.lang.Strin\u2026ing(startIndex, endIndex)"
|
|
|
|
invoke-static {v1, v3}, Lkotlin/jvm/internal/f0;->o(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-static {v1}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I
|
|
|
|
move-result v1
|
|
:try_end_0
|
|
.catch Ljava/lang/NumberFormatException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
.line 12
|
|
invoke-virtual {p1}, Ljava/lang/String;->length()I
|
|
|
|
move-result v3
|
|
|
|
if-le v3, v2, :cond_5
|
|
|
|
.line 13
|
|
invoke-virtual {p1, v2}, Ljava/lang/String;->charAt(I)C
|
|
|
|
move-result v2
|
|
|
|
if-ne v2, v4, :cond_4
|
|
|
|
add-int/2addr v6, v5
|
|
|
|
.line 14
|
|
invoke-virtual {p1, v6}, Ljava/lang/String;->substring(I)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v2, "(this as java.lang.String).substring(startIndex)"
|
|
|
|
invoke-static {p1, v2}, Lkotlin/jvm/internal/f0;->o(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
goto :goto_1
|
|
|
|
.line 15
|
|
:cond_4
|
|
new-instance v0, Ljava/net/ProtocolException;
|
|
|
|
invoke-static {v7, p1}, Lc/g;->a(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {v0, p1}, Ljava/net/ProtocolException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_5
|
|
const-string p1, ""
|
|
|
|
.line 16
|
|
:goto_1
|
|
new-instance v2, Lokhttp3/internal/http/StatusLine;
|
|
|
|
invoke-direct {v2, v0, v1, p1}, Lokhttp3/internal/http/StatusLine;-><init>(Lokhttp3/Protocol;ILjava/lang/String;)V
|
|
|
|
return-object v2
|
|
|
|
.line 17
|
|
:catch_0
|
|
new-instance v0, Ljava/net/ProtocolException;
|
|
|
|
invoke-static {v7, p1}, Lc/g;->a(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {v0, p1}, Ljava/net/ProtocolException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
.line 18
|
|
:cond_6
|
|
new-instance v0, Ljava/net/ProtocolException;
|
|
|
|
invoke-static {v7, p1}, Lc/g;->a(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {v0, p1}, Ljava/net/ProtocolException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
.line 19
|
|
:cond_7
|
|
new-instance v0, Ljava/net/ProtocolException;
|
|
|
|
invoke-static {v7, p1}, Lc/g;->a(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {v0, p1}, Ljava/net/ProtocolException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|