ab.smali
.class final Lcom/squareup/okhttp/internal/framed/ab;
.super Ljava/lang/Object;
.source "Spdy3.java"
# interfaces
.implements Lcom/squareup/okhttp/internal/framed/a;
# instance fields
.field private final bxT:Z
.field private final byt:Lokio/f;
.field private final bzH:Lcom/squareup/okhttp/internal/framed/w;
# direct methods
.method constructor <init>(Lokio/f;Z)V
.registers 5
.prologue
.line 112
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 113
iput-object p1, p0, Lcom/squareup/okhttp/internal/framed/ab;->byt:Lokio/f;
.line 114
new-instance v0, Lcom/squareup/okhttp/internal/framed/w;
iget-object v1, p0, Lcom/squareup/okhttp/internal/framed/ab;->byt:Lokio/f;
invoke-direct {v0, v1}, Lcom/squareup/okhttp/internal/framed/w;-><init>(Lokio/f;)V
iput-object v0, p0, Lcom/squareup/okhttp/internal/framed/ab;->bzH:Lcom/squareup/okhttp/internal/framed/w;
.line 115
iput-boolean p2, p0, Lcom/squareup/okhttp/internal/framed/ab;->bxT:Z
.line 116
return-void
.end method
.method private static varargs a(Ljava/lang/String;[Ljava/lang/Object;)Ljava/io/IOException;
.registers 4
.prologue
.line 278
new-instance v0, Ljava/io/IOException;
invoke-static {p0, p1}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object v1
invoke-direct {v0, v1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
throw v0
.end method
.method private a(Lcom/squareup/okhttp/internal/framed/b;II)V
.registers 13
.prologue
const/4 v0, 0x1
const/4 v1, 0x0
.line 261
iget-object v2, p0, Lcom/squareup/okhttp/internal/framed/ab;->byt:Lokio/f;
invoke-interface {v2}, Lokio/f;->readInt()I
move-result v3
.line 262
shl-int/lit8 v2, v3, 0x3
add-int/lit8 v2, v2, 0x4
if-eq p3, v2, :cond_24
.line 263
const-string v2, "TYPE_SETTINGS length: %d != 4 + 8 * %d"
const/4 v4, 0x2
new-array v4, v4, [Ljava/lang/Object;
invoke-static {p3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v5
aput-object v5, v4, v1
invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v1
aput-object v1, v4, v0
invoke-static {v2, v4}, Lcom/squareup/okhttp/internal/framed/ab;->a(Ljava/lang/String;[Ljava/lang/Object;)Ljava/io/IOException;
move-result-object v0
throw v0
.line 265
:cond_24
new-instance v4, Lcom/squareup/okhttp/internal/framed/z;
invoke-direct {v4}, Lcom/squareup/okhttp/internal/framed/z;-><init>()V
move v2, v1
.line 266
:goto_2a
if-ge v2, v3, :cond_47
.line 267
iget-object v5, p0, Lcom/squareup/okhttp/internal/framed/ab;->byt:Lokio/f;
invoke-interface {v5}, Lokio/f;->readInt()I
move-result v5
.line 268
iget-object v6, p0, Lcom/squareup/okhttp/internal/framed/ab;->byt:Lokio/f;
invoke-interface {v6}, Lokio/f;->readInt()I
move-result v6
.line 269
const/high16 v7, -0x1000000
and-int/2addr v7, v5
ushr-int/lit8 v7, v7, 0x18
.line 270
const v8, 0xffffff
and-int/2addr v5, v8
.line 271
invoke-virtual {v4, v5, v7, v6}, Lcom/squareup/okhttp/internal/framed/z;->S(III)Lcom/squareup/okhttp/internal/framed/z;
.line 266
add-int/lit8 v2, v2, 0x1
goto :goto_2a
.line 273
:cond_47
and-int/lit8 v2, p2, 0x1
if-eqz v2, :cond_4f
.line 274
:goto_4b
invoke-interface {p1, v0, v4}, Lcom/squareup/okhttp/internal/framed/b;->a(ZLcom/squareup/okhttp/internal/framed/z;)V
.line 275
return-void
:cond_4f
move v0, v1
.line 273
goto :goto_4b
.end method
# virtual methods
.method public final Hk()V
.registers 1
.prologue
.line 119
return-void
.end method
.method public final a(Lcom/squareup/okhttp/internal/framed/b;)Z
.registers 11
.prologue
const/16 v8, 0x8
const v7, 0x7fffffff
const/4 v1, 0x0
const/4 v6, 0x1
.line 129
:try_start_7
iget-object v0, p0, Lcom/squareup/okhttp/internal/framed/ab;->byt:Lokio/f;
invoke-interface {v0}, Lokio/f;->readInt()I
move-result v2
.line 130
iget-object v0, p0, Lcom/squareup/okhttp/internal/framed/ab;->byt:Lokio/f;
invoke-interface {v0}, Lokio/f;->readInt()I
:try_end_12
.catch Ljava/io/IOException; {:try_start_7 .. :try_end_12} :catch_45
move-result v3
.line 135
const/high16 v0, -0x80000000
and-int/2addr v0, v2
if-eqz v0, :cond_48
move v0, v6
.line 136
:goto_19
const/high16 v4, -0x1000000
and-int/2addr v4, v3
ushr-int/lit8 v5, v4, 0x18
.line 137
const v4, 0xffffff
and-int/2addr v4, v3
.line 139
if-eqz v0, :cond_194
.line 140
const/high16 v0, 0x7fff0000
and-int/2addr v0, v2
ushr-int/lit8 v0, v0, 0x10
.line 141
const v3, 0xffff
and-int/2addr v2, v3
.line 143
const/4 v3, 0x3
if-eq v0, v3, :cond_4a
.line 144
new-instance v1, Ljava/net/ProtocolException;
new-instance v2, Ljava/lang/StringBuilder;
const-string v3, "version != 3: "
invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
invoke-direct {v1, v0}, Ljava/net/ProtocolException;-><init>(Ljava/lang/String;)V
throw v1
.line 132
:catch_45
move-exception v0
move v6, v1
.line 188
:goto_47
return v6
:cond_48
move v0, v1
.line 135
goto :goto_19
.line 147
:cond_4a
packed-switch v2, :pswitch_data_1a2
.line 181
:pswitch_4d
iget-object v0, p0, Lcom/squareup/okhttp/internal/framed/ab;->byt:Lokio/f;
int-to-long v2, v4
invoke-interface {v0, v2, v3}, Lokio/f;->Y(J)V
goto :goto_47
.line 1193
:pswitch_54
iget-object v0, p0, Lcom/squareup/okhttp/internal/framed/ab;->byt:Lokio/f;
invoke-interface {v0}, Lokio/f;->readInt()I
move-result v0
.line 1194
iget-object v2, p0, Lcom/squareup/okhttp/internal/framed/ab;->byt:Lokio/f;
invoke-interface {v2}, Lokio/f;->readInt()I
.line 1195
and-int v3, v0, v7
.line 1197
iget-object v0, p0, Lcom/squareup/okhttp/internal/framed/ab;->byt:Lokio/f;
invoke-interface {v0}, Lokio/f;->readShort()S
.line 1198
iget-object v0, p0, Lcom/squareup/okhttp/internal/framed/ab;->bzH:Lcom/squareup/okhttp/internal/framed/w;
add-int/lit8 v2, v4, -0xa
invoke-virtual {v0, v2}, Lcom/squareup/okhttp/internal/framed/w;->ew(I)Ljava/util/List;
move-result-object v4
.line 1200
and-int/lit8 v0, v5, 0x1
if-eqz v0, :cond_7f
move v2, v6
.line 1201
:goto_73
and-int/lit8 v0, v5, 0x2
if-eqz v0, :cond_78
move v1, v6
.line 1202
:cond_78
sget-object v5, Lcom/squareup/okhttp/internal/framed/HeadersMode;->SPDY_SYN_STREAM:Lcom/squareup/okhttp/internal/framed/HeadersMode;
move-object v0, p1
invoke-interface/range {v0 .. v5}, Lcom/squareup/okhttp/internal/framed/b;->a(ZZILjava/util/List;Lcom/squareup/okhttp/internal/framed/HeadersMode;)V
goto :goto_47
:cond_7f
move v2, v1
.line 1200
goto :goto_73
.line 1207
:pswitch_81
iget-object v0, p0, Lcom/squareup/okhttp/internal/framed/ab;->byt:Lokio/f;
invoke-interface {v0}, Lokio/f;->readInt()I
move-result v0
.line 1208
and-int v3, v0, v7
.line 1209
iget-object v0, p0, Lcom/squareup/okhttp/internal/framed/ab;->bzH:Lcom/squareup/okhttp/internal/framed/w;
add-int/lit8 v2, v4, -0x4
invoke-virtual {v0, v2}, Lcom/squareup/okhttp/internal/framed/w;->ew(I)Ljava/util/List;
move-result-object v4
.line 1210
and-int/lit8 v0, v5, 0x1
if-eqz v0, :cond_9d
move v2, v6
.line 1211
:goto_96
sget-object v5, Lcom/squareup/okhttp/internal/framed/HeadersMode;->SPDY_REPLY:Lcom/squareup/okhttp/internal/framed/HeadersMode;
move-object v0, p1
invoke-interface/range {v0 .. v5}, Lcom/squareup/okhttp/internal/framed/b;->a(ZZILjava/util/List;Lcom/squareup/okhttp/internal/framed/HeadersMode;)V
goto :goto_47
:cond_9d
move v2, v1
.line 1210
goto :goto_96
.line 1215
:pswitch_9f
if-eq v4, v8, :cond_b0
const-string v0, "TYPE_RST_STREAM length: %d != 8"
new-array v2, v6, [Ljava/lang/Object;
invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v3
aput-object v3, v2, v1
invoke-static {v0, v2}, Lcom/squareup/okhttp/internal/framed/ab;->a(Ljava/lang/String;[Ljava/lang/Object;)Ljava/io/IOException;
move-result-object v0
throw v0
.line 1216
:cond_b0
iget-object v0, p0, Lcom/squareup/okhttp/internal/framed/ab;->byt:Lokio/f;
invoke-interface {v0}, Lokio/f;->readInt()I
move-result v0
and-int/2addr v0, v7
.line 1217
iget-object v2, p0, Lcom/squareup/okhttp/internal/framed/ab;->byt:Lokio/f;
invoke-interface {v2}, Lokio/f;->readInt()I
move-result v2
.line 1218
invoke-static {v2}, Lcom/squareup/okhttp/internal/framed/ErrorCode;->fromSpdy3Rst(I)Lcom/squareup/okhttp/internal/framed/ErrorCode;
move-result-object v3
.line 1219
if-nez v3, :cond_d2
.line 1220
const-string v0, "TYPE_RST_STREAM unexpected error code: %d"
new-array v3, v6, [Ljava/lang/Object;
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v2
aput-object v2, v3, v1
invoke-static {v0, v3}, Lcom/squareup/okhttp/internal/framed/ab;->a(Ljava/lang/String;[Ljava/lang/Object;)Ljava/io/IOException;
move-result-object v0
throw v0
.line 1222
:cond_d2
invoke-interface {p1, v0, v3}, Lcom/squareup/okhttp/internal/framed/b;->a(ILcom/squareup/okhttp/internal/framed/ErrorCode;)V
goto/16 :goto_47
.line 161
:pswitch_d7
invoke-direct {p0, p1, v5, v4}, Lcom/squareup/okhttp/internal/framed/ab;->a(Lcom/squareup/okhttp/internal/framed/b;II)V
goto/16 :goto_47
.line 1243
:pswitch_dc
const/4 v0, 0x4
if-eq v4, v0, :cond_ee
const-string v0, "TYPE_PING length: %d != 4"
new-array v2, v6, [Ljava/lang/Object;
invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v3
aput-object v3, v2, v1
invoke-static {v0, v2}, Lcom/squareup/okhttp/internal/framed/ab;->a(Ljava/lang/String;[Ljava/lang/Object;)Ljava/io/IOException;
move-result-object v0
throw v0
.line 1244
:cond_ee
iget-object v0, p0, Lcom/squareup/okhttp/internal/framed/ab;->byt:Lokio/f;
invoke-interface {v0}, Lokio/f;->readInt()I
move-result v2
.line 1245
iget-boolean v3, p0, Lcom/squareup/okhttp/internal/framed/ab;->bxT:Z
and-int/lit8 v0, v2, 0x1
if-ne v0, v6, :cond_103
move v0, v6
:goto_fb
if-ne v3, v0, :cond_105
move v0, v6
.line 1246
:goto_fe
invoke-interface {p1, v0, v2, v1}, Lcom/squareup/okhttp/internal/framed/b;->a(ZII)V
goto/16 :goto_47
:cond_103
move v0, v1
.line 1245
goto :goto_fb
:cond_105
move v0, v1
goto :goto_fe
.line 1250
:pswitch_107
if-eq v4, v8, :cond_118
const-string v0, "TYPE_GOAWAY length: %d != 8"
new-array v2, v6, [Ljava/lang/Object;
invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v3
aput-object v3, v2, v1
invoke-static {v0, v2}, Lcom/squareup/okhttp/internal/framed/ab;->a(Ljava/lang/String;[Ljava/lang/Object;)Ljava/io/IOException;
move-result-object v0
throw v0
.line 1251
:cond_118
iget-object v0, p0, Lcom/squareup/okhttp/internal/framed/ab;->byt:Lokio/f;
invoke-interface {v0}, Lokio/f;->readInt()I
move-result v0
and-int/2addr v0, v7
.line 1252
iget-object v2, p0, Lcom/squareup/okhttp/internal/framed/ab;->byt:Lokio/f;
invoke-interface {v2}, Lokio/f;->readInt()I
move-result v2
.line 1253
invoke-static {v2}, Lcom/squareup/okhttp/internal/framed/ErrorCode;->fromSpdyGoAway(I)Lcom/squareup/okhttp/internal/framed/ErrorCode;
move-result-object v3
.line 1254
if-nez v3, :cond_13a
.line 1255
const-string v0, "TYPE_GOAWAY unexpected error code: %d"
new-array v3, v6, [Ljava/lang/Object;
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v2
aput-object v2, v3, v1
invoke-static {v0, v3}, Lcom/squareup/okhttp/internal/framed/ab;->a(Ljava/lang/String;[Ljava/lang/Object;)Ljava/io/IOException;
move-result-object v0
throw v0
.line 1257
:cond_13a
sget-object v1, Lokio/ByteString;->EMPTY:Lokio/ByteString;
invoke-interface {p1, v0, v1}, Lcom/squareup/okhttp/internal/framed/b;->a(ILokio/ByteString;)V
goto/16 :goto_47
.line 2226
:pswitch_141
iget-object v0, p0, Lcom/squareup/okhttp/internal/framed/ab;->byt:Lokio/f;
invoke-interface {v0}, Lokio/f;->readInt()I
move-result v0
.line 2227
and-int v3, v0, v7
.line 2228
iget-object v0, p0, Lcom/squareup/okhttp/internal/framed/ab;->bzH:Lcom/squareup/okhttp/internal/framed/w;
add-int/lit8 v2, v4, -0x4
invoke-virtual {v0, v2}, Lcom/squareup/okhttp/internal/framed/w;->ew(I)Ljava/util/List;
move-result-object v4
.line 2229
sget-object v5, Lcom/squareup/okhttp/internal/framed/HeadersMode;->SPDY_HEADERS:Lcom/squareup/okhttp/internal/framed/HeadersMode;
move-object v0, p1
move v2, v1
invoke-interface/range {v0 .. v5}, Lcom/squareup/okhttp/internal/framed/b;->a(ZZILjava/util/List;Lcom/squareup/okhttp/internal/framed/HeadersMode;)V
goto/16 :goto_47
.line 2233
:pswitch_15a
if-eq v4, v8, :cond_16b
const-string v0, "TYPE_WINDOW_UPDATE length: %d != 8"
new-array v2, v6, [Ljava/lang/Object;
invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v3
aput-object v3, v2, v1
invoke-static {v0, v2}, Lcom/squareup/okhttp/internal/framed/ab;->a(Ljava/lang/String;[Ljava/lang/Object;)Ljava/io/IOException;
move-result-object v0
throw v0
.line 2234
:cond_16b
iget-object v0, p0, Lcom/squareup/okhttp/internal/framed/ab;->byt:Lokio/f;
invoke-interface {v0}, Lokio/f;->readInt()I
move-result v0
.line 2235
iget-object v2, p0, Lcom/squareup/okhttp/internal/framed/ab;->byt:Lokio/f;
invoke-interface {v2}, Lokio/f;->readInt()I
move-result v2
.line 2236
and-int/2addr v0, v7
.line 2237
and-int/2addr v2, v7
int-to-long v2, v2
.line 2238
const-wide/16 v4, 0x0
cmp-long v4, v2, v4
if-nez v4, :cond_18f
const-string v0, "windowSizeIncrement was 0"
new-array v4, v6, [Ljava/lang/Object;
invoke-static {v2, v3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object v2
aput-object v2, v4, v1
invoke-static {v0, v4}, Lcom/squareup/okhttp/internal/framed/ab;->a(Ljava/lang/String;[Ljava/lang/Object;)Ljava/io/IOException;
move-result-object v0
throw v0
.line 2239
:cond_18f
invoke-interface {p1, v0, v2, v3}, Lcom/squareup/okhttp/internal/framed/b;->f(IJ)V
goto/16 :goto_47
.line 185
:cond_194
and-int v0, v2, v7
.line 186
and-int/lit8 v2, v5, 0x1
if-eqz v2, :cond_19b
move v1, v6
.line 187
:cond_19b
iget-object v2, p0, Lcom/squareup/okhttp/internal/framed/ab;->byt:Lokio/f;
invoke-interface {p1, v1, v0, v2, v4}, Lcom/squareup/okhttp/internal/framed/b;->a(ZILokio/f;I)V
goto/16 :goto_47
.line 147
:pswitch_data_1a2
.packed-switch 0x1
:pswitch_54
:pswitch_81
:pswitch_9f
:pswitch_d7
:pswitch_4d
:pswitch_dc
:pswitch_107
:pswitch_141
:pswitch_15a
.end packed-switch
.end method
.method public final close()V
.registers 2
.prologue
.line 282
iget-object v0, p0, Lcom/squareup/okhttp/internal/framed/ab;->bzH:Lcom/squareup/okhttp/internal/framed/w;
.line 3116
iget-object v0, v0, Lcom/squareup/okhttp/internal/framed/w;->byt:Lokio/f;
invoke-interface {v0}, Lokio/f;->close()V
.line 283
return-void
.end method