Add Discord APKTool decompilation (Smali source for modding)

- Imported from https://github.com/supermegamestre/Project-Real-Resurrection-3
- APKTool decompilation (Smali bytecode) for modding and rebuilding APK
- Supports both 32-bit (armeabi-v7a) and 64-bit (arm64-v8a) architectures
- Includes full Smali source, resources, and native libraries
- Ready to rebuild APK after modifications with apktool b command
- Added comprehensive README-apktool.md with modding guide

This branch complements the JADX branches:
- Use JADX (main/discord-community) to UNDERSTAND code (readable Java)
- Use APKTool (this branch) to MODIFY and REBUILD APK (editable Smali)

Total: 44,417 files, 538.51 MB Smali source code
This commit is contained in:
2026-02-18 16:13:44 -08:00
parent c080f0d97f
commit f3960ee359
44288 changed files with 10998761 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
.class public abstract Lokhttp3/internal/Internal;
.super Ljava/lang/Object;
.source "SourceFile"
# static fields
.field public static instance:Lokhttp3/internal/Internal;
# direct methods
.method public constructor <init>()V
.locals 0
.line 35
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public abstract addLenient(Lokhttp3/Headers$Builder;Ljava/lang/String;)V
.end method
.method public abstract addLenient(Lokhttp3/Headers$Builder;Ljava/lang/String;Ljava/lang/String;)V
.end method
.method public abstract apply(Lokhttp3/ConnectionSpec;Ljavax/net/ssl/SSLSocket;Z)V
.end method
.method public abstract code(Lokhttp3/Response$Builder;)I
.end method
.method public abstract equalsNonHost(Lokhttp3/Address;Lokhttp3/Address;)Z
.end method
.method public abstract exchange(Lokhttp3/Response;)Lokhttp3/internal/connection/Exchange;
.end method
.method public abstract initExchange(Lokhttp3/Response$Builder;Lokhttp3/internal/connection/Exchange;)V
.end method
.method public abstract realConnectionPool(Lokhttp3/ConnectionPool;)Lokhttp3/internal/connection/RealConnectionPool;
.end method

View File

@@ -0,0 +1,81 @@
.class public abstract Lokhttp3/internal/NamedRunnable;
.super Ljava/lang/Object;
.source "SourceFile"
# interfaces
.implements Ljava/lang/Runnable;
# instance fields
.field public final name:Ljava/lang/String;
# direct methods
.method public varargs constructor <init>(Ljava/lang/String;[Ljava/lang/Object;)V
.locals 0
.line 24
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 25
invoke-static {p1, p2}, Lokhttp3/internal/Util;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object p1
iput-object p1, p0, Lokhttp3/internal/NamedRunnable;->name:Ljava/lang/String;
return-void
.end method
# virtual methods
.method public abstract execute()V
.end method
.method public final run()V
.locals 3
.line 29
invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/Thread;->getName()Ljava/lang/String;
move-result-object v0
.line 30
invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
move-result-object v1
iget-object v2, p0, Lokhttp3/internal/NamedRunnable;->name:Ljava/lang/String;
invoke-virtual {v1, v2}, Ljava/lang/Thread;->setName(Ljava/lang/String;)V
.line 32
:try_start_0
invoke-virtual {p0}, Lokhttp3/internal/NamedRunnable;->execute()V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 34
invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
move-result-object v1
invoke-virtual {v1, v0}, Ljava/lang/Thread;->setName(Ljava/lang/String;)V
return-void
:catchall_0
move-exception v1
invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
move-result-object v2
invoke-virtual {v2, v0}, Ljava/lang/Thread;->setName(Ljava/lang/String;)V
throw v1
.end method

View File

@@ -0,0 +1,44 @@
.class public final synthetic Lokhttp3/internal/Util$$ExternalSyntheticLambda0;
.super Ljava/lang/Object;
.source "SourceFile"
# interfaces
.implements Ljava/util/concurrent/ThreadFactory;
# instance fields
.field public final synthetic f$0:Ljava/lang/String;
.field public final synthetic f$1:Z
# direct methods
.method public synthetic constructor <init>(Ljava/lang/String;Z)V
.locals 0
.line 0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Lokhttp3/internal/Util$$ExternalSyntheticLambda0;->f$0:Ljava/lang/String;
iput-boolean p2, p0, Lokhttp3/internal/Util$$ExternalSyntheticLambda0;->f$1:Z
return-void
.end method
# virtual methods
.method public final newThread(Ljava/lang/Runnable;)Ljava/lang/Thread;
.locals 2
.line 0
iget-object v0, p0, Lokhttp3/internal/Util$$ExternalSyntheticLambda0;->f$0:Ljava/lang/String;
iget-boolean v1, p0, Lokhttp3/internal/Util$$ExternalSyntheticLambda0;->f$1:Z
invoke-static {v0, v1, p1}, Lokhttp3/internal/Util;->$r8$lambda$CKtmiXfHFlf_KUU5HpYC_rUBFnY(Ljava/lang/String;ZLjava/lang/Runnable;)Ljava/lang/Thread;
move-result-object p1
return-object p1
.end method

View File

@@ -0,0 +1,33 @@
.class public final synthetic Lokhttp3/internal/Util$$ExternalSyntheticLambda1;
.super Ljava/lang/Object;
.source "SourceFile"
# interfaces
.implements Ljava/util/Comparator;
# direct methods
.method public synthetic constructor <init>()V
.locals 0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public final compare(Ljava/lang/Object;Ljava/lang/Object;)I
.locals 0
.line 0
check-cast p1, Ljava/lang/String;
check-cast p2, Ljava/lang/String;
invoke-virtual {p1, p2}, Ljava/lang/String;->compareTo(Ljava/lang/String;)I
move-result p1
return p1
.end method

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,13 @@
.class public abstract Lokhttp3/internal/Version;
.super Ljava/lang/Object;
.source "SourceFile"
# direct methods
.method public static userAgent()Ljava/lang/String;
.locals 1
const-string v0, "okhttp/3.14.9"
return-object v0
.end method

View File

@@ -0,0 +1,181 @@
.class public Lokhttp3/internal/cache/CacheInterceptor$1;
.super Ljava/lang/Object;
.source "SourceFile"
# interfaces
.implements Lokio/Source;
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lokhttp3/internal/cache/CacheInterceptor;->cacheWritingResponse(Lokhttp3/internal/cache/CacheRequest;Lokhttp3/Response;)Lokhttp3/Response;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1
name = null
.end annotation
# instance fields
.field public cacheRequestClosed:Z
.field public final synthetic this$0:Lokhttp3/internal/cache/CacheInterceptor;
.field public final synthetic val$cacheBody:Lokio/BufferedSink;
.field public final synthetic val$cacheRequest:Lokhttp3/internal/cache/CacheRequest;
.field public final synthetic val$source:Lokio/BufferedSource;
# direct methods
.method public constructor <init>(Lokhttp3/internal/cache/CacheInterceptor;Lokio/BufferedSource;Lokhttp3/internal/cache/CacheRequest;Lokio/BufferedSink;)V
.locals 0
iput-object p1, p0, Lokhttp3/internal/cache/CacheInterceptor$1;->this$0:Lokhttp3/internal/cache/CacheInterceptor;
iput-object p2, p0, Lokhttp3/internal/cache/CacheInterceptor$1;->val$source:Lokio/BufferedSource;
iput-object p3, p0, Lokhttp3/internal/cache/CacheInterceptor$1;->val$cacheRequest:Lokhttp3/internal/cache/CacheRequest;
iput-object p4, p0, Lokhttp3/internal/cache/CacheInterceptor$1;->val$cacheBody:Lokio/BufferedSink;
.line 169
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public close()V
.locals 2
iget-boolean v0, p0, Lokhttp3/internal/cache/CacheInterceptor$1;->cacheRequestClosed:Z
if-nez v0, :cond_0
const/16 v0, 0x64
.line 202
sget-object v1, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit;
.line 203
invoke-static {p0, v0, v1}, Lokhttp3/internal/Util;->discard(Lokio/Source;ILjava/util/concurrent/TimeUnit;)Z
move-result v0
if-nez v0, :cond_0
const/4 v0, 0x1
iput-boolean v0, p0, Lokhttp3/internal/cache/CacheInterceptor$1;->cacheRequestClosed:Z
iget-object v0, p0, Lokhttp3/internal/cache/CacheInterceptor$1;->val$cacheRequest:Lokhttp3/internal/cache/CacheRequest;
.line 205
invoke-interface {v0}, Lokhttp3/internal/cache/CacheRequest;->abort()V
:cond_0
iget-object v0, p0, Lokhttp3/internal/cache/CacheInterceptor$1;->val$source:Lokio/BufferedSource;
.line 207
invoke-interface {v0}, Lokio/Source;->close()V
return-void
.end method
.method public read(Lokio/Buffer;J)J
.locals 8
const/4 v0, 0x1
:try_start_0
iget-object v1, p0, Lokhttp3/internal/cache/CacheInterceptor$1;->val$source:Lokio/BufferedSource;
.line 175
invoke-interface {v1, p1, p2, p3}, Lokio/Source;->read(Lokio/Buffer;J)J
move-result-wide p2
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
const-wide/16 v1, -0x1
cmp-long v3, p2, v1
if-nez v3, :cond_1
iget-boolean p1, p0, Lokhttp3/internal/cache/CacheInterceptor$1;->cacheRequestClosed:Z
if-nez p1, :cond_0
iput-boolean v0, p0, Lokhttp3/internal/cache/CacheInterceptor$1;->cacheRequestClosed:Z
iget-object p1, p0, Lokhttp3/internal/cache/CacheInterceptor$1;->val$cacheBody:Lokio/BufferedSink;
.line 187
invoke-interface {p1}, Lokio/Sink;->close()V
:cond_0
return-wide v1
:cond_1
iget-object v0, p0, Lokhttp3/internal/cache/CacheInterceptor$1;->val$cacheBody:Lokio/BufferedSink;
.line 192
invoke-interface {v0}, Lokio/BufferedSink;->buffer()Lokio/Buffer;
move-result-object v3
invoke-virtual {p1}, Lokio/Buffer;->size()J
move-result-wide v0
sub-long v4, v0, p2
move-object v2, p1
move-wide v6, p2
invoke-virtual/range {v2 .. v7}, Lokio/Buffer;->copyTo(Lokio/Buffer;JJ)Lokio/Buffer;
iget-object p1, p0, Lokhttp3/internal/cache/CacheInterceptor$1;->val$cacheBody:Lokio/BufferedSink;
.line 193
invoke-interface {p1}, Lokio/BufferedSink;->emitCompleteSegments()Lokio/BufferedSink;
return-wide p2
:catch_0
move-exception p1
iget-boolean p2, p0, Lokhttp3/internal/cache/CacheInterceptor$1;->cacheRequestClosed:Z
if-nez p2, :cond_2
iput-boolean v0, p0, Lokhttp3/internal/cache/CacheInterceptor$1;->cacheRequestClosed:Z
iget-object p2, p0, Lokhttp3/internal/cache/CacheInterceptor$1;->val$cacheRequest:Lokhttp3/internal/cache/CacheRequest;
.line 179
invoke-interface {p2}, Lokhttp3/internal/cache/CacheRequest;->abort()V
.line 181
:cond_2
throw p1
.end method
.method public timeout()Lokio/Timeout;
.locals 1
iget-object v0, p0, Lokhttp3/internal/cache/CacheInterceptor$1;->val$source:Lokio/BufferedSource;
.line 198
invoke-interface {v0}, Lokio/Source;->timeout()Lokio/Timeout;
move-result-object v0
return-object v0
.end method

View File

@@ -0,0 +1,780 @@
.class public final Lokhttp3/internal/cache/CacheInterceptor;
.super Ljava/lang/Object;
.source "SourceFile"
# interfaces
.implements Lokhttp3/Interceptor;
# instance fields
.field public final cache:Lokhttp3/internal/cache/InternalCache;
# direct methods
.method public constructor <init>(Lokhttp3/internal/cache/InternalCache;)V
.locals 0
.line 49
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Lokhttp3/internal/cache/CacheInterceptor;->cache:Lokhttp3/internal/cache/InternalCache;
return-void
.end method
.method public static combine(Lokhttp3/Headers;Lokhttp3/Headers;)Lokhttp3/Headers;
.locals 7
.line 220
new-instance v0, Lokhttp3/Headers$Builder;
invoke-direct {v0}, Lokhttp3/Headers$Builder;-><init>()V
.line 222
invoke-virtual {p0}, Lokhttp3/Headers;->size()I
move-result v1
const/4 v2, 0x0
move v3, v2
:goto_0
if-ge v3, v1, :cond_3
.line 223
invoke-virtual {p0, v3}, Lokhttp3/Headers;->name(I)Ljava/lang/String;
move-result-object v4
.line 224
invoke-virtual {p0, v3}, Lokhttp3/Headers;->value(I)Ljava/lang/String;
move-result-object v5
const-string v6, "Warning"
.line 225
invoke-virtual {v6, v4}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
move-result v6
if-eqz v6, :cond_0
const-string v6, "1"
invoke-virtual {v5, v6}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
move-result v6
if-eqz v6, :cond_0
goto :goto_1
.line 228
:cond_0
invoke-static {v4}, Lokhttp3/internal/cache/CacheInterceptor;->isContentSpecificHeader(Ljava/lang/String;)Z
move-result v6
if-nez v6, :cond_1
.line 229
invoke-static {v4}, Lokhttp3/internal/cache/CacheInterceptor;->isEndToEnd(Ljava/lang/String;)Z
move-result v6
if-eqz v6, :cond_1
.line 230
invoke-virtual {p1, v4}, Lokhttp3/Headers;->get(Ljava/lang/String;)Ljava/lang/String;
move-result-object v6
if-nez v6, :cond_2
:cond_1
sget-object v6, Lokhttp3/internal/Internal;->instance:Lokhttp3/internal/Internal;
.line 231
invoke-virtual {v6, v0, v4, v5}, Lokhttp3/internal/Internal;->addLenient(Lokhttp3/Headers$Builder;Ljava/lang/String;Ljava/lang/String;)V
:cond_2
:goto_1
add-int/lit8 v3, v3, 0x1
goto :goto_0
.line 235
:cond_3
invoke-virtual {p1}, Lokhttp3/Headers;->size()I
move-result p0
:goto_2
if-ge v2, p0, :cond_5
.line 236
invoke-virtual {p1, v2}, Lokhttp3/Headers;->name(I)Ljava/lang/String;
move-result-object v1
.line 237
invoke-static {v1}, Lokhttp3/internal/cache/CacheInterceptor;->isContentSpecificHeader(Ljava/lang/String;)Z
move-result v3
if-nez v3, :cond_4
invoke-static {v1}, Lokhttp3/internal/cache/CacheInterceptor;->isEndToEnd(Ljava/lang/String;)Z
move-result v3
if-eqz v3, :cond_4
sget-object v3, Lokhttp3/internal/Internal;->instance:Lokhttp3/internal/Internal;
.line 238
invoke-virtual {p1, v2}, Lokhttp3/Headers;->value(I)Ljava/lang/String;
move-result-object v4
invoke-virtual {v3, v0, v1, v4}, Lokhttp3/internal/Internal;->addLenient(Lokhttp3/Headers$Builder;Ljava/lang/String;Ljava/lang/String;)V
:cond_4
add-int/lit8 v2, v2, 0x1
goto :goto_2
.line 242
:cond_5
invoke-virtual {v0}, Lokhttp3/Headers$Builder;->build()Lokhttp3/Headers;
move-result-object p0
return-object p0
.end method
.method public static isContentSpecificHeader(Ljava/lang/String;)Z
.locals 1
const-string v0, "Content-Length"
.line 265
invoke-virtual {v0, p0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
move-result v0
if-nez v0, :cond_1
const-string v0, "Content-Encoding"
.line 266
invoke-virtual {v0, p0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
move-result v0
if-nez v0, :cond_1
const-string v0, "Content-Type"
.line 267
invoke-virtual {v0, p0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
move-result p0
if-eqz p0, :cond_0
goto :goto_0
:cond_0
const/4 p0, 0x0
goto :goto_1
:cond_1
:goto_0
const/4 p0, 0x1
:goto_1
return p0
.end method
.method public static isEndToEnd(Ljava/lang/String;)Z
.locals 1
const-string v0, "Connection"
.line 250
invoke-virtual {v0, p0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
move-result v0
if-nez v0, :cond_0
const-string v0, "Keep-Alive"
.line 251
invoke-virtual {v0, p0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
move-result v0
if-nez v0, :cond_0
const-string v0, "Proxy-Authenticate"
.line 252
invoke-virtual {v0, p0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
move-result v0
if-nez v0, :cond_0
const-string v0, "Proxy-Authorization"
.line 253
invoke-virtual {v0, p0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
move-result v0
if-nez v0, :cond_0
const-string v0, "TE"
.line 254
invoke-virtual {v0, p0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
move-result v0
if-nez v0, :cond_0
const-string v0, "Trailers"
.line 255
invoke-virtual {v0, p0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
move-result v0
if-nez v0, :cond_0
const-string v0, "Transfer-Encoding"
.line 256
invoke-virtual {v0, p0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
move-result v0
if-nez v0, :cond_0
const-string v0, "Upgrade"
.line 257
invoke-virtual {v0, p0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
move-result p0
if-nez p0, :cond_0
const/4 p0, 0x1
goto :goto_0
:cond_0
const/4 p0, 0x0
:goto_0
return p0
.end method
.method public static stripBody(Lokhttp3/Response;)Lokhttp3/Response;
.locals 1
if-eqz p0, :cond_0
.line 149
invoke-virtual {p0}, Lokhttp3/Response;->body()Lokhttp3/ResponseBody;
move-result-object v0
if-eqz v0, :cond_0
.line 150
invoke-virtual {p0}, Lokhttp3/Response;->newBuilder()Lokhttp3/Response$Builder;
move-result-object p0
const/4 v0, 0x0
invoke-virtual {p0, v0}, Lokhttp3/Response$Builder;->body(Lokhttp3/ResponseBody;)Lokhttp3/Response$Builder;
move-result-object p0
invoke-virtual {p0}, Lokhttp3/Response$Builder;->build()Lokhttp3/Response;
move-result-object p0
:cond_0
return-object p0
.end method
# virtual methods
.method public final cacheWritingResponse(Lokhttp3/internal/cache/CacheRequest;Lokhttp3/Response;)Lokhttp3/Response;
.locals 4
if-nez p1, :cond_0
return-object p2
.line 163
:cond_0
invoke-interface {p1}, Lokhttp3/internal/cache/CacheRequest;->body()Lokio/Sink;
move-result-object v0
if-nez v0, :cond_1
return-object p2
.line 166
:cond_1
invoke-virtual {p2}, Lokhttp3/Response;->body()Lokhttp3/ResponseBody;
move-result-object v1
invoke-virtual {v1}, Lokhttp3/ResponseBody;->source()Lokio/BufferedSource;
move-result-object v1
.line 167
invoke-static {v0}, Lokio/Okio;->buffer(Lokio/Sink;)Lokio/BufferedSink;
move-result-object v0
.line 169
new-instance v2, Lokhttp3/internal/cache/CacheInterceptor$1;
invoke-direct {v2, p0, v1, p1, v0}, Lokhttp3/internal/cache/CacheInterceptor$1;-><init>(Lokhttp3/internal/cache/CacheInterceptor;Lokio/BufferedSource;Lokhttp3/internal/cache/CacheRequest;Lokio/BufferedSink;)V
const-string p1, "Content-Type"
.line 211
invoke-virtual {p2, p1}, Lokhttp3/Response;->header(Ljava/lang/String;)Ljava/lang/String;
move-result-object p1
.line 212
invoke-virtual {p2}, Lokhttp3/Response;->body()Lokhttp3/ResponseBody;
move-result-object v0
invoke-virtual {v0}, Lokhttp3/ResponseBody;->contentLength()J
move-result-wide v0
.line 213
invoke-virtual {p2}, Lokhttp3/Response;->newBuilder()Lokhttp3/Response$Builder;
move-result-object p2
new-instance v3, Lokhttp3/internal/http/RealResponseBody;
.line 214
invoke-static {v2}, Lokio/Okio;->buffer(Lokio/Source;)Lokio/BufferedSource;
move-result-object v2
invoke-direct {v3, p1, v0, v1, v2}, Lokhttp3/internal/http/RealResponseBody;-><init>(Ljava/lang/String;JLokio/BufferedSource;)V
invoke-virtual {p2, v3}, Lokhttp3/Response$Builder;->body(Lokhttp3/ResponseBody;)Lokhttp3/Response$Builder;
move-result-object p1
.line 215
invoke-virtual {p1}, Lokhttp3/Response$Builder;->build()Lokhttp3/Response;
move-result-object p1
return-object p1
.end method
.method public intercept(Lokhttp3/Interceptor$Chain;)Lokhttp3/Response;
.locals 5
iget-object v0, p0, Lokhttp3/internal/cache/CacheInterceptor;->cache:Lokhttp3/internal/cache/InternalCache;
if-eqz v0, :cond_0
.line 55
invoke-interface {p1}, Lokhttp3/Interceptor$Chain;->request()Lokhttp3/Request;
move-result-object v1
invoke-interface {v0, v1}, Lokhttp3/internal/cache/InternalCache;->get(Lokhttp3/Request;)Lokhttp3/Response;
move-result-object v0
goto :goto_0
:cond_0
const/4 v0, 0x0
.line 58
:goto_0
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
move-result-wide v1
.line 60
new-instance v3, Lokhttp3/internal/cache/CacheStrategy$Factory;
invoke-interface {p1}, Lokhttp3/Interceptor$Chain;->request()Lokhttp3/Request;
move-result-object v4
invoke-direct {v3, v1, v2, v4, v0}, Lokhttp3/internal/cache/CacheStrategy$Factory;-><init>(JLokhttp3/Request;Lokhttp3/Response;)V
invoke-virtual {v3}, Lokhttp3/internal/cache/CacheStrategy$Factory;->get()Lokhttp3/internal/cache/CacheStrategy;
move-result-object v1
.line 61
iget-object v2, v1, Lokhttp3/internal/cache/CacheStrategy;->networkRequest:Lokhttp3/Request;
.line 62
iget-object v3, v1, Lokhttp3/internal/cache/CacheStrategy;->cacheResponse:Lokhttp3/Response;
iget-object v4, p0, Lokhttp3/internal/cache/CacheInterceptor;->cache:Lokhttp3/internal/cache/InternalCache;
if-eqz v4, :cond_1
.line 65
invoke-interface {v4, v1}, Lokhttp3/internal/cache/InternalCache;->trackResponse(Lokhttp3/internal/cache/CacheStrategy;)V
:cond_1
if-eqz v0, :cond_2
if-nez v3, :cond_2
.line 69
invoke-virtual {v0}, Lokhttp3/Response;->body()Lokhttp3/ResponseBody;
move-result-object v1
invoke-static {v1}, Lokhttp3/internal/Util;->closeQuietly(Ljava/io/Closeable;)V
:cond_2
if-nez v2, :cond_3
if-nez v3, :cond_3
.line 74
new-instance v0, Lokhttp3/Response$Builder;
invoke-direct {v0}, Lokhttp3/Response$Builder;-><init>()V
.line 75
invoke-interface {p1}, Lokhttp3/Interceptor$Chain;->request()Lokhttp3/Request;
move-result-object p1
invoke-virtual {v0, p1}, Lokhttp3/Response$Builder;->request(Lokhttp3/Request;)Lokhttp3/Response$Builder;
move-result-object p1
sget-object v0, Lokhttp3/Protocol;->HTTP_1_1:Lokhttp3/Protocol;
.line 76
invoke-virtual {p1, v0}, Lokhttp3/Response$Builder;->protocol(Lokhttp3/Protocol;)Lokhttp3/Response$Builder;
move-result-object p1
const/16 v0, 0x1f8
.line 77
invoke-virtual {p1, v0}, Lokhttp3/Response$Builder;->code(I)Lokhttp3/Response$Builder;
move-result-object p1
const-string v0, "Unsatisfiable Request (only-if-cached)"
.line 78
invoke-virtual {p1, v0}, Lokhttp3/Response$Builder;->message(Ljava/lang/String;)Lokhttp3/Response$Builder;
move-result-object p1
sget-object v0, Lokhttp3/internal/Util;->EMPTY_RESPONSE:Lokhttp3/ResponseBody;
.line 79
invoke-virtual {p1, v0}, Lokhttp3/Response$Builder;->body(Lokhttp3/ResponseBody;)Lokhttp3/Response$Builder;
move-result-object p1
const-wide/16 v0, -0x1
.line 80
invoke-virtual {p1, v0, v1}, Lokhttp3/Response$Builder;->sentRequestAtMillis(J)Lokhttp3/Response$Builder;
move-result-object p1
.line 81
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
move-result-wide v0
invoke-virtual {p1, v0, v1}, Lokhttp3/Response$Builder;->receivedResponseAtMillis(J)Lokhttp3/Response$Builder;
move-result-object p1
.line 82
invoke-virtual {p1}, Lokhttp3/Response$Builder;->build()Lokhttp3/Response;
move-result-object p1
return-object p1
:cond_3
if-nez v2, :cond_4
.line 87
invoke-virtual {v3}, Lokhttp3/Response;->newBuilder()Lokhttp3/Response$Builder;
move-result-object p1
.line 88
invoke-static {v3}, Lokhttp3/internal/cache/CacheInterceptor;->stripBody(Lokhttp3/Response;)Lokhttp3/Response;
move-result-object v0
invoke-virtual {p1, v0}, Lokhttp3/Response$Builder;->cacheResponse(Lokhttp3/Response;)Lokhttp3/Response$Builder;
move-result-object p1
.line 89
invoke-virtual {p1}, Lokhttp3/Response$Builder;->build()Lokhttp3/Response;
move-result-object p1
return-object p1
.line 94
:cond_4
:try_start_0
invoke-interface {p1, v2}, Lokhttp3/Interceptor$Chain;->proceed(Lokhttp3/Request;)Lokhttp3/Response;
move-result-object p1
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
if-nez p1, :cond_5
if-eqz v0, :cond_5
.line 98
invoke-virtual {v0}, Lokhttp3/Response;->body()Lokhttp3/ResponseBody;
move-result-object v0
invoke-static {v0}, Lokhttp3/internal/Util;->closeQuietly(Ljava/io/Closeable;)V
:cond_5
if-eqz v3, :cond_7
.line 104
invoke-virtual {p1}, Lokhttp3/Response;->code()I
move-result v0
const/16 v1, 0x130
if-ne v0, v1, :cond_6
.line 105
invoke-virtual {v3}, Lokhttp3/Response;->newBuilder()Lokhttp3/Response$Builder;
move-result-object v0
.line 106
invoke-virtual {v3}, Lokhttp3/Response;->headers()Lokhttp3/Headers;
move-result-object v1
invoke-virtual {p1}, Lokhttp3/Response;->headers()Lokhttp3/Headers;
move-result-object v2
invoke-static {v1, v2}, Lokhttp3/internal/cache/CacheInterceptor;->combine(Lokhttp3/Headers;Lokhttp3/Headers;)Lokhttp3/Headers;
move-result-object v1
invoke-virtual {v0, v1}, Lokhttp3/Response$Builder;->headers(Lokhttp3/Headers;)Lokhttp3/Response$Builder;
move-result-object v0
.line 107
invoke-virtual {p1}, Lokhttp3/Response;->sentRequestAtMillis()J
move-result-wide v1
invoke-virtual {v0, v1, v2}, Lokhttp3/Response$Builder;->sentRequestAtMillis(J)Lokhttp3/Response$Builder;
move-result-object v0
.line 108
invoke-virtual {p1}, Lokhttp3/Response;->receivedResponseAtMillis()J
move-result-wide v1
invoke-virtual {v0, v1, v2}, Lokhttp3/Response$Builder;->receivedResponseAtMillis(J)Lokhttp3/Response$Builder;
move-result-object v0
.line 109
invoke-static {v3}, Lokhttp3/internal/cache/CacheInterceptor;->stripBody(Lokhttp3/Response;)Lokhttp3/Response;
move-result-object v1
invoke-virtual {v0, v1}, Lokhttp3/Response$Builder;->cacheResponse(Lokhttp3/Response;)Lokhttp3/Response$Builder;
move-result-object v0
.line 110
invoke-static {p1}, Lokhttp3/internal/cache/CacheInterceptor;->stripBody(Lokhttp3/Response;)Lokhttp3/Response;
move-result-object v1
invoke-virtual {v0, v1}, Lokhttp3/Response$Builder;->networkResponse(Lokhttp3/Response;)Lokhttp3/Response$Builder;
move-result-object v0
.line 111
invoke-virtual {v0}, Lokhttp3/Response$Builder;->build()Lokhttp3/Response;
move-result-object v0
.line 112
invoke-virtual {p1}, Lokhttp3/Response;->body()Lokhttp3/ResponseBody;
move-result-object p1
invoke-virtual {p1}, Lokhttp3/ResponseBody;->close()V
iget-object p1, p0, Lokhttp3/internal/cache/CacheInterceptor;->cache:Lokhttp3/internal/cache/InternalCache;
.line 116
invoke-interface {p1}, Lokhttp3/internal/cache/InternalCache;->trackConditionalCacheHit()V
iget-object p1, p0, Lokhttp3/internal/cache/CacheInterceptor;->cache:Lokhttp3/internal/cache/InternalCache;
.line 117
invoke-interface {p1, v3, v0}, Lokhttp3/internal/cache/InternalCache;->update(Lokhttp3/Response;Lokhttp3/Response;)V
return-object v0
.line 120
:cond_6
invoke-virtual {v3}, Lokhttp3/Response;->body()Lokhttp3/ResponseBody;
move-result-object v0
invoke-static {v0}, Lokhttp3/internal/Util;->closeQuietly(Ljava/io/Closeable;)V
.line 124
:cond_7
invoke-virtual {p1}, Lokhttp3/Response;->newBuilder()Lokhttp3/Response$Builder;
move-result-object v0
.line 125
invoke-static {v3}, Lokhttp3/internal/cache/CacheInterceptor;->stripBody(Lokhttp3/Response;)Lokhttp3/Response;
move-result-object v1
invoke-virtual {v0, v1}, Lokhttp3/Response$Builder;->cacheResponse(Lokhttp3/Response;)Lokhttp3/Response$Builder;
move-result-object v0
.line 126
invoke-static {p1}, Lokhttp3/internal/cache/CacheInterceptor;->stripBody(Lokhttp3/Response;)Lokhttp3/Response;
move-result-object p1
invoke-virtual {v0, p1}, Lokhttp3/Response$Builder;->networkResponse(Lokhttp3/Response;)Lokhttp3/Response$Builder;
move-result-object p1
.line 127
invoke-virtual {p1}, Lokhttp3/Response$Builder;->build()Lokhttp3/Response;
move-result-object p1
iget-object v0, p0, Lokhttp3/internal/cache/CacheInterceptor;->cache:Lokhttp3/internal/cache/InternalCache;
if-eqz v0, :cond_9
.line 130
invoke-static {p1}, Lokhttp3/internal/http/HttpHeaders;->hasBody(Lokhttp3/Response;)Z
move-result v0
if-eqz v0, :cond_8
invoke-static {p1, v2}, Lokhttp3/internal/cache/CacheStrategy;->isCacheable(Lokhttp3/Response;Lokhttp3/Request;)Z
move-result v0
if-eqz v0, :cond_8
iget-object v0, p0, Lokhttp3/internal/cache/CacheInterceptor;->cache:Lokhttp3/internal/cache/InternalCache;
.line 132
invoke-interface {v0, p1}, Lokhttp3/internal/cache/InternalCache;->put(Lokhttp3/Response;)Lokhttp3/internal/cache/CacheRequest;
move-result-object v0
.line 133
invoke-virtual {p0, v0, p1}, Lokhttp3/internal/cache/CacheInterceptor;->cacheWritingResponse(Lokhttp3/internal/cache/CacheRequest;Lokhttp3/Response;)Lokhttp3/Response;
move-result-object p1
return-object p1
.line 136
:cond_8
invoke-virtual {v2}, Lokhttp3/Request;->method()Ljava/lang/String;
move-result-object v0
invoke-static {v0}, Lokhttp3/internal/http/HttpMethod;->invalidatesCache(Ljava/lang/String;)Z
move-result v0
if-eqz v0, :cond_9
:try_start_1
iget-object v0, p0, Lokhttp3/internal/cache/CacheInterceptor;->cache:Lokhttp3/internal/cache/InternalCache;
.line 138
invoke-interface {v0, v2}, Lokhttp3/internal/cache/InternalCache;->remove(Lokhttp3/Request;)V
:try_end_1
.catch Ljava/io/IOException; {:try_start_1 .. :try_end_1} :catch_0
:catch_0
:cond_9
return-object p1
:catchall_0
move-exception p1
if-eqz v0, :cond_a
.line 98
invoke-virtual {v0}, Lokhttp3/Response;->body()Lokhttp3/ResponseBody;
move-result-object v0
invoke-static {v0}, Lokhttp3/internal/Util;->closeQuietly(Ljava/io/Closeable;)V
:cond_a
throw p1
.end method

View File

@@ -0,0 +1,11 @@
.class public interface abstract Lokhttp3/internal/cache/CacheRequest;
.super Ljava/lang/Object;
.source "SourceFile"
# virtual methods
.method public abstract abort()V
.end method
.method public abstract body()Lokio/Sink;
.end method

View File

@@ -0,0 +1,855 @@
.class public Lokhttp3/internal/cache/CacheStrategy$Factory;
.super Ljava/lang/Object;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lokhttp3/internal/cache/CacheStrategy;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x9
name = "Factory"
.end annotation
# instance fields
.field public ageSeconds:I
.field public final cacheResponse:Lokhttp3/Response;
.field public etag:Ljava/lang/String;
.field public expires:Ljava/util/Date;
.field public lastModified:Ljava/util/Date;
.field public lastModifiedString:Ljava/lang/String;
.field public final nowMillis:J
.field public receivedResponseMillis:J
.field public final request:Lokhttp3/Request;
.field public sentRequestMillis:J
.field public servedDate:Ljava/util/Date;
.field public servedDateString:Ljava/lang/String;
# direct methods
.method public constructor <init>(JLokhttp3/Request;Lokhttp3/Response;)V
.locals 3
.line 140
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
const/4 v0, -0x1
iput v0, p0, Lokhttp3/internal/cache/CacheStrategy$Factory;->ageSeconds:I
iput-wide p1, p0, Lokhttp3/internal/cache/CacheStrategy$Factory;->nowMillis:J
iput-object p3, p0, Lokhttp3/internal/cache/CacheStrategy$Factory;->request:Lokhttp3/Request;
iput-object p4, p0, Lokhttp3/internal/cache/CacheStrategy$Factory;->cacheResponse:Lokhttp3/Response;
if-eqz p4, :cond_5
.line 146
invoke-virtual {p4}, Lokhttp3/Response;->sentRequestAtMillis()J
move-result-wide p1
iput-wide p1, p0, Lokhttp3/internal/cache/CacheStrategy$Factory;->sentRequestMillis:J
.line 147
invoke-virtual {p4}, Lokhttp3/Response;->receivedResponseAtMillis()J
move-result-wide p1
iput-wide p1, p0, Lokhttp3/internal/cache/CacheStrategy$Factory;->receivedResponseMillis:J
.line 148
invoke-virtual {p4}, Lokhttp3/Response;->headers()Lokhttp3/Headers;
move-result-object p1
.line 149
invoke-virtual {p1}, Lokhttp3/Headers;->size()I
move-result p2
const/4 p3, 0x0
:goto_0
if-ge p3, p2, :cond_5
.line 150
invoke-virtual {p1, p3}, Lokhttp3/Headers;->name(I)Ljava/lang/String;
move-result-object p4
.line 151
invoke-virtual {p1, p3}, Lokhttp3/Headers;->value(I)Ljava/lang/String;
move-result-object v1
const-string v2, "Date"
.line 152
invoke-virtual {v2, p4}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
move-result v2
if-eqz v2, :cond_0
.line 153
invoke-static {v1}, Lokhttp3/internal/http/HttpDate;->parse(Ljava/lang/String;)Ljava/util/Date;
move-result-object p4
iput-object p4, p0, Lokhttp3/internal/cache/CacheStrategy$Factory;->servedDate:Ljava/util/Date;
iput-object v1, p0, Lokhttp3/internal/cache/CacheStrategy$Factory;->servedDateString:Ljava/lang/String;
goto :goto_1
:cond_0
const-string v2, "Expires"
.line 155
invoke-virtual {v2, p4}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
move-result v2
if-eqz v2, :cond_1
.line 156
invoke-static {v1}, Lokhttp3/internal/http/HttpDate;->parse(Ljava/lang/String;)Ljava/util/Date;
move-result-object p4
iput-object p4, p0, Lokhttp3/internal/cache/CacheStrategy$Factory;->expires:Ljava/util/Date;
goto :goto_1
:cond_1
const-string v2, "Last-Modified"
.line 157
invoke-virtual {v2, p4}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
move-result v2
if-eqz v2, :cond_2
.line 158
invoke-static {v1}, Lokhttp3/internal/http/HttpDate;->parse(Ljava/lang/String;)Ljava/util/Date;
move-result-object p4
iput-object p4, p0, Lokhttp3/internal/cache/CacheStrategy$Factory;->lastModified:Ljava/util/Date;
iput-object v1, p0, Lokhttp3/internal/cache/CacheStrategy$Factory;->lastModifiedString:Ljava/lang/String;
goto :goto_1
:cond_2
const-string v2, "ETag"
.line 160
invoke-virtual {v2, p4}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
move-result v2
if-eqz v2, :cond_3
iput-object v1, p0, Lokhttp3/internal/cache/CacheStrategy$Factory;->etag:Ljava/lang/String;
goto :goto_1
:cond_3
const-string v2, "Age"
.line 162
invoke-virtual {v2, p4}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
move-result p4
if-eqz p4, :cond_4
.line 163
invoke-static {v1, v0}, Lokhttp3/internal/http/HttpHeaders;->parseSeconds(Ljava/lang/String;I)I
move-result p4
iput p4, p0, Lokhttp3/internal/cache/CacheStrategy$Factory;->ageSeconds:I
:cond_4
:goto_1
add-int/lit8 p3, p3, 0x1
goto :goto_0
:cond_5
return-void
.end method
.method public static hasConditions(Lokhttp3/Request;)Z
.locals 1
const-string v0, "If-Modified-Since"
.line 323
invoke-virtual {p0, v0}, Lokhttp3/Request;->header(Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
if-nez v0, :cond_1
const-string v0, "If-None-Match"
invoke-virtual {p0, v0}, Lokhttp3/Request;->header(Ljava/lang/String;)Ljava/lang/String;
move-result-object p0
if-eqz p0, :cond_0
goto :goto_0
:cond_0
const/4 p0, 0x0
goto :goto_1
:cond_1
:goto_0
const/4 p0, 0x1
:goto_1
return p0
.end method
# virtual methods
.method public final cacheResponseAge()J
.locals 9
iget-object v0, p0, Lokhttp3/internal/cache/CacheStrategy$Factory;->servedDate:Ljava/util/Date;
const-wide/16 v1, 0x0
if-eqz v0, :cond_0
iget-wide v3, p0, Lokhttp3/internal/cache/CacheStrategy$Factory;->receivedResponseMillis:J
.line 299
invoke-virtual {v0}, Ljava/util/Date;->getTime()J
move-result-wide v5
sub-long/2addr v3, v5
invoke-static {v1, v2, v3, v4}, Ljava/lang/Math;->max(JJ)J
move-result-wide v1
:cond_0
iget v0, p0, Lokhttp3/internal/cache/CacheStrategy$Factory;->ageSeconds:I
const/4 v3, -0x1
if-eq v0, v3, :cond_1
.line 302
sget-object v3, Ljava/util/concurrent/TimeUnit;->SECONDS:Ljava/util/concurrent/TimeUnit;
int-to-long v4, v0
invoke-virtual {v3, v4, v5}, Ljava/util/concurrent/TimeUnit;->toMillis(J)J
move-result-wide v3
invoke-static {v1, v2, v3, v4}, Ljava/lang/Math;->max(JJ)J
move-result-wide v1
:cond_1
iget-wide v3, p0, Lokhttp3/internal/cache/CacheStrategy$Factory;->receivedResponseMillis:J
iget-wide v5, p0, Lokhttp3/internal/cache/CacheStrategy$Factory;->sentRequestMillis:J
sub-long v5, v3, v5
iget-wide v7, p0, Lokhttp3/internal/cache/CacheStrategy$Factory;->nowMillis:J
sub-long/2addr v7, v3
add-long/2addr v1, v5
add-long/2addr v1, v7
return-wide v1
.end method
.method public final computeFreshnessLifetime()J
.locals 7
iget-object v0, p0, Lokhttp3/internal/cache/CacheStrategy$Factory;->cacheResponse:Lokhttp3/Response;
.line 269
invoke-virtual {v0}, Lokhttp3/Response;->cacheControl()Lokhttp3/CacheControl;
move-result-object v0
.line 270
invoke-virtual {v0}, Lokhttp3/CacheControl;->maxAgeSeconds()I
move-result v1
const/4 v2, -0x1
if-eq v1, v2, :cond_0
.line 271
sget-object v1, Ljava/util/concurrent/TimeUnit;->SECONDS:Ljava/util/concurrent/TimeUnit;
invoke-virtual {v0}, Lokhttp3/CacheControl;->maxAgeSeconds()I
move-result v0
int-to-long v2, v0
invoke-virtual {v1, v2, v3}, Ljava/util/concurrent/TimeUnit;->toMillis(J)J
move-result-wide v0
return-wide v0
:cond_0
iget-object v0, p0, Lokhttp3/internal/cache/CacheStrategy$Factory;->expires:Ljava/util/Date;
const-wide/16 v1, 0x0
if-eqz v0, :cond_3
iget-object v0, p0, Lokhttp3/internal/cache/CacheStrategy$Factory;->servedDate:Ljava/util/Date;
if-eqz v0, :cond_1
.line 274
invoke-virtual {v0}, Ljava/util/Date;->getTime()J
move-result-wide v3
goto :goto_0
:cond_1
iget-wide v3, p0, Lokhttp3/internal/cache/CacheStrategy$Factory;->receivedResponseMillis:J
:goto_0
iget-object v0, p0, Lokhttp3/internal/cache/CacheStrategy$Factory;->expires:Ljava/util/Date;
.line 276
invoke-virtual {v0}, Ljava/util/Date;->getTime()J
move-result-wide v5
sub-long/2addr v5, v3
cmp-long v0, v5, v1
if-lez v0, :cond_2
move-wide v1, v5
:cond_2
return-wide v1
:cond_3
iget-object v0, p0, Lokhttp3/internal/cache/CacheStrategy$Factory;->lastModified:Ljava/util/Date;
if-eqz v0, :cond_5
iget-object v0, p0, Lokhttp3/internal/cache/CacheStrategy$Factory;->cacheResponse:Lokhttp3/Response;
.line 279
invoke-virtual {v0}, Lokhttp3/Response;->request()Lokhttp3/Request;
move-result-object v0
invoke-virtual {v0}, Lokhttp3/Request;->url()Lokhttp3/HttpUrl;
move-result-object v0
invoke-virtual {v0}, Lokhttp3/HttpUrl;->query()Ljava/lang/String;
move-result-object v0
if-nez v0, :cond_5
iget-object v0, p0, Lokhttp3/internal/cache/CacheStrategy$Factory;->servedDate:Ljava/util/Date;
if-eqz v0, :cond_4
.line 285
invoke-virtual {v0}, Ljava/util/Date;->getTime()J
move-result-wide v3
goto :goto_1
:cond_4
iget-wide v3, p0, Lokhttp3/internal/cache/CacheStrategy$Factory;->sentRequestMillis:J
:goto_1
iget-object v0, p0, Lokhttp3/internal/cache/CacheStrategy$Factory;->lastModified:Ljava/util/Date;
.line 287
invoke-virtual {v0}, Ljava/util/Date;->getTime()J
move-result-wide v5
sub-long/2addr v3, v5
cmp-long v0, v3, v1
if-lez v0, :cond_5
const-wide/16 v0, 0xa
.line 288
div-long v1, v3, v0
:cond_5
return-wide v1
.end method
.method public get()Lokhttp3/internal/cache/CacheStrategy;
.locals 2
.line 173
invoke-virtual {p0}, Lokhttp3/internal/cache/CacheStrategy$Factory;->getCandidate()Lokhttp3/internal/cache/CacheStrategy;
move-result-object v0
.line 175
iget-object v1, v0, Lokhttp3/internal/cache/CacheStrategy;->networkRequest:Lokhttp3/Request;
if-eqz v1, :cond_0
iget-object v1, p0, Lokhttp3/internal/cache/CacheStrategy$Factory;->request:Lokhttp3/Request;
invoke-virtual {v1}, Lokhttp3/Request;->cacheControl()Lokhttp3/CacheControl;
move-result-object v1
invoke-virtual {v1}, Lokhttp3/CacheControl;->onlyIfCached()Z
move-result v1
if-eqz v1, :cond_0
.line 177
new-instance v0, Lokhttp3/internal/cache/CacheStrategy;
const/4 v1, 0x0
invoke-direct {v0, v1, v1}, Lokhttp3/internal/cache/CacheStrategy;-><init>(Lokhttp3/Request;Lokhttp3/Response;)V
:cond_0
return-object v0
.end method
.method public final getCandidate()Lokhttp3/internal/cache/CacheStrategy;
.locals 13
iget-object v0, p0, Lokhttp3/internal/cache/CacheStrategy$Factory;->cacheResponse:Lokhttp3/Response;
const/4 v1, 0x0
if-nez v0, :cond_0
.line 187
new-instance v0, Lokhttp3/internal/cache/CacheStrategy;
iget-object v2, p0, Lokhttp3/internal/cache/CacheStrategy$Factory;->request:Lokhttp3/Request;
invoke-direct {v0, v2, v1}, Lokhttp3/internal/cache/CacheStrategy;-><init>(Lokhttp3/Request;Lokhttp3/Response;)V
return-object v0
:cond_0
iget-object v0, p0, Lokhttp3/internal/cache/CacheStrategy$Factory;->request:Lokhttp3/Request;
.line 191
invoke-virtual {v0}, Lokhttp3/Request;->isHttps()Z
move-result v0
if-eqz v0, :cond_1
iget-object v0, p0, Lokhttp3/internal/cache/CacheStrategy$Factory;->cacheResponse:Lokhttp3/Response;
invoke-virtual {v0}, Lokhttp3/Response;->handshake()Lokhttp3/Handshake;
move-result-object v0
if-nez v0, :cond_1
.line 192
new-instance v0, Lokhttp3/internal/cache/CacheStrategy;
iget-object v2, p0, Lokhttp3/internal/cache/CacheStrategy$Factory;->request:Lokhttp3/Request;
invoke-direct {v0, v2, v1}, Lokhttp3/internal/cache/CacheStrategy;-><init>(Lokhttp3/Request;Lokhttp3/Response;)V
return-object v0
:cond_1
iget-object v0, p0, Lokhttp3/internal/cache/CacheStrategy$Factory;->cacheResponse:Lokhttp3/Response;
iget-object v2, p0, Lokhttp3/internal/cache/CacheStrategy$Factory;->request:Lokhttp3/Request;
.line 198
invoke-static {v0, v2}, Lokhttp3/internal/cache/CacheStrategy;->isCacheable(Lokhttp3/Response;Lokhttp3/Request;)Z
move-result v0
if-nez v0, :cond_2
.line 199
new-instance v0, Lokhttp3/internal/cache/CacheStrategy;
iget-object v2, p0, Lokhttp3/internal/cache/CacheStrategy$Factory;->request:Lokhttp3/Request;
invoke-direct {v0, v2, v1}, Lokhttp3/internal/cache/CacheStrategy;-><init>(Lokhttp3/Request;Lokhttp3/Response;)V
return-object v0
:cond_2
iget-object v0, p0, Lokhttp3/internal/cache/CacheStrategy$Factory;->request:Lokhttp3/Request;
.line 202
invoke-virtual {v0}, Lokhttp3/Request;->cacheControl()Lokhttp3/CacheControl;
move-result-object v0
.line 203
invoke-virtual {v0}, Lokhttp3/CacheControl;->noCache()Z
move-result v2
if-nez v2, :cond_d
iget-object v2, p0, Lokhttp3/internal/cache/CacheStrategy$Factory;->request:Lokhttp3/Request;
invoke-static {v2}, Lokhttp3/internal/cache/CacheStrategy$Factory;->hasConditions(Lokhttp3/Request;)Z
move-result v2
if-eqz v2, :cond_3
goto/16 :goto_3
:cond_3
iget-object v2, p0, Lokhttp3/internal/cache/CacheStrategy$Factory;->cacheResponse:Lokhttp3/Response;
.line 207
invoke-virtual {v2}, Lokhttp3/Response;->cacheControl()Lokhttp3/CacheControl;
move-result-object v2
.line 209
invoke-virtual {p0}, Lokhttp3/internal/cache/CacheStrategy$Factory;->cacheResponseAge()J
move-result-wide v3
.line 210
invoke-virtual {p0}, Lokhttp3/internal/cache/CacheStrategy$Factory;->computeFreshnessLifetime()J
move-result-wide v5
.line 212
invoke-virtual {v0}, Lokhttp3/CacheControl;->maxAgeSeconds()I
move-result v7
const/4 v8, -0x1
if-eq v7, v8, :cond_4
.line 213
sget-object v7, Ljava/util/concurrent/TimeUnit;->SECONDS:Ljava/util/concurrent/TimeUnit;
invoke-virtual {v0}, Lokhttp3/CacheControl;->maxAgeSeconds()I
move-result v9
int-to-long v9, v9
invoke-virtual {v7, v9, v10}, Ljava/util/concurrent/TimeUnit;->toMillis(J)J
move-result-wide v9
invoke-static {v5, v6, v9, v10}, Ljava/lang/Math;->min(JJ)J
move-result-wide v5
.line 217
:cond_4
invoke-virtual {v0}, Lokhttp3/CacheControl;->minFreshSeconds()I
move-result v7
const-wide/16 v9, 0x0
if-eq v7, v8, :cond_5
.line 218
sget-object v7, Ljava/util/concurrent/TimeUnit;->SECONDS:Ljava/util/concurrent/TimeUnit;
invoke-virtual {v0}, Lokhttp3/CacheControl;->minFreshSeconds()I
move-result v11
int-to-long v11, v11
invoke-virtual {v7, v11, v12}, Ljava/util/concurrent/TimeUnit;->toMillis(J)J
move-result-wide v11
goto :goto_0
:cond_5
move-wide v11, v9
.line 222
:goto_0
invoke-virtual {v2}, Lokhttp3/CacheControl;->mustRevalidate()Z
move-result v7
if-nez v7, :cond_6
invoke-virtual {v0}, Lokhttp3/CacheControl;->maxStaleSeconds()I
move-result v7
if-eq v7, v8, :cond_6
.line 223
sget-object v7, Ljava/util/concurrent/TimeUnit;->SECONDS:Ljava/util/concurrent/TimeUnit;
invoke-virtual {v0}, Lokhttp3/CacheControl;->maxStaleSeconds()I
move-result v0
int-to-long v8, v0
invoke-virtual {v7, v8, v9}, Ljava/util/concurrent/TimeUnit;->toMillis(J)J
move-result-wide v9
.line 226
:cond_6
invoke-virtual {v2}, Lokhttp3/CacheControl;->noCache()Z
move-result v0
if-nez v0, :cond_9
add-long/2addr v11, v3
add-long/2addr v9, v5
cmp-long v0, v11, v9
if-gez v0, :cond_9
iget-object v0, p0, Lokhttp3/internal/cache/CacheStrategy$Factory;->cacheResponse:Lokhttp3/Response;
.line 227
invoke-virtual {v0}, Lokhttp3/Response;->newBuilder()Lokhttp3/Response$Builder;
move-result-object v0
cmp-long v2, v11, v5
const-string v5, "Warning"
if-ltz v2, :cond_7
const-string v2, "110 HttpURLConnection \"Response is stale\""
.line 229
invoke-virtual {v0, v5, v2}, Lokhttp3/Response$Builder;->addHeader(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Response$Builder;
:cond_7
const-wide/32 v6, 0x5265c00
cmp-long v2, v3, v6
if-lez v2, :cond_8
.line 232
invoke-virtual {p0}, Lokhttp3/internal/cache/CacheStrategy$Factory;->isFreshnessLifetimeHeuristic()Z
move-result v2
if-eqz v2, :cond_8
const-string v2, "113 HttpURLConnection \"Heuristic expiration\""
.line 233
invoke-virtual {v0, v5, v2}, Lokhttp3/Response$Builder;->addHeader(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Response$Builder;
.line 235
:cond_8
new-instance v2, Lokhttp3/internal/cache/CacheStrategy;
invoke-virtual {v0}, Lokhttp3/Response$Builder;->build()Lokhttp3/Response;
move-result-object v0
invoke-direct {v2, v1, v0}, Lokhttp3/internal/cache/CacheStrategy;-><init>(Lokhttp3/Request;Lokhttp3/Response;)V
return-object v2
:cond_9
iget-object v0, p0, Lokhttp3/internal/cache/CacheStrategy$Factory;->etag:Ljava/lang/String;
if-eqz v0, :cond_a
const-string v1, "If-None-Match"
goto :goto_2
:cond_a
iget-object v0, p0, Lokhttp3/internal/cache/CacheStrategy$Factory;->lastModified:Ljava/util/Date;
const-string v2, "If-Modified-Since"
if-eqz v0, :cond_b
iget-object v0, p0, Lokhttp3/internal/cache/CacheStrategy$Factory;->lastModifiedString:Ljava/lang/String;
:goto_1
move-object v1, v2
goto :goto_2
:cond_b
iget-object v0, p0, Lokhttp3/internal/cache/CacheStrategy$Factory;->servedDate:Ljava/util/Date;
if-eqz v0, :cond_c
iget-object v0, p0, Lokhttp3/internal/cache/CacheStrategy$Factory;->servedDateString:Ljava/lang/String;
goto :goto_1
:goto_2
iget-object v2, p0, Lokhttp3/internal/cache/CacheStrategy$Factory;->request:Lokhttp3/Request;
.line 255
invoke-virtual {v2}, Lokhttp3/Request;->headers()Lokhttp3/Headers;
move-result-object v2
invoke-virtual {v2}, Lokhttp3/Headers;->newBuilder()Lokhttp3/Headers$Builder;
move-result-object v2
sget-object v3, Lokhttp3/internal/Internal;->instance:Lokhttp3/internal/Internal;
.line 256
invoke-virtual {v3, v2, v1, v0}, Lokhttp3/internal/Internal;->addLenient(Lokhttp3/Headers$Builder;Ljava/lang/String;Ljava/lang/String;)V
iget-object v0, p0, Lokhttp3/internal/cache/CacheStrategy$Factory;->request:Lokhttp3/Request;
.line 258
invoke-virtual {v0}, Lokhttp3/Request;->newBuilder()Lokhttp3/Request$Builder;
move-result-object v0
.line 259
invoke-virtual {v2}, Lokhttp3/Headers$Builder;->build()Lokhttp3/Headers;
move-result-object v1
invoke-virtual {v0, v1}, Lokhttp3/Request$Builder;->headers(Lokhttp3/Headers;)Lokhttp3/Request$Builder;
move-result-object v0
.line 260
invoke-virtual {v0}, Lokhttp3/Request$Builder;->build()Lokhttp3/Request;
move-result-object v0
.line 261
new-instance v1, Lokhttp3/internal/cache/CacheStrategy;
iget-object v2, p0, Lokhttp3/internal/cache/CacheStrategy$Factory;->cacheResponse:Lokhttp3/Response;
invoke-direct {v1, v0, v2}, Lokhttp3/internal/cache/CacheStrategy;-><init>(Lokhttp3/Request;Lokhttp3/Response;)V
return-object v1
.line 252
:cond_c
new-instance v0, Lokhttp3/internal/cache/CacheStrategy;
iget-object v2, p0, Lokhttp3/internal/cache/CacheStrategy$Factory;->request:Lokhttp3/Request;
invoke-direct {v0, v2, v1}, Lokhttp3/internal/cache/CacheStrategy;-><init>(Lokhttp3/Request;Lokhttp3/Response;)V
return-object v0
.line 204
:cond_d
:goto_3
new-instance v0, Lokhttp3/internal/cache/CacheStrategy;
iget-object v2, p0, Lokhttp3/internal/cache/CacheStrategy$Factory;->request:Lokhttp3/Request;
invoke-direct {v0, v2, v1}, Lokhttp3/internal/cache/CacheStrategy;-><init>(Lokhttp3/Request;Lokhttp3/Response;)V
return-object v0
.end method
.method public final isFreshnessLifetimeHeuristic()Z
.locals 2
iget-object v0, p0, Lokhttp3/internal/cache/CacheStrategy$Factory;->cacheResponse:Lokhttp3/Response;
.line 314
invoke-virtual {v0}, Lokhttp3/Response;->cacheControl()Lokhttp3/CacheControl;
move-result-object v0
invoke-virtual {v0}, Lokhttp3/CacheControl;->maxAgeSeconds()I
move-result v0
const/4 v1, -0x1
if-ne v0, v1, :cond_0
iget-object v0, p0, Lokhttp3/internal/cache/CacheStrategy$Factory;->expires:Ljava/util/Date;
if-nez v0, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
return v0
.end method

View File

@@ -0,0 +1,175 @@
.class public final Lokhttp3/internal/cache/CacheStrategy;
.super Ljava/lang/Object;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lokhttp3/internal/cache/CacheStrategy$Factory;
}
.end annotation
# instance fields
.field public final cacheResponse:Lokhttp3/Response;
.field public final networkRequest:Lokhttp3/Request;
# direct methods
.method public constructor <init>(Lokhttp3/Request;Lokhttp3/Response;)V
.locals 0
.line 57
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Lokhttp3/internal/cache/CacheStrategy;->networkRequest:Lokhttp3/Request;
iput-object p2, p0, Lokhttp3/internal/cache/CacheStrategy;->cacheResponse:Lokhttp3/Response;
return-void
.end method
.method public static isCacheable(Lokhttp3/Response;Lokhttp3/Request;)Z
.locals 3
.line 66
invoke-virtual {p0}, Lokhttp3/Response;->code()I
move-result v0
const/16 v1, 0xc8
const/4 v2, 0x0
if-eq v0, v1, :cond_2
const/16 v1, 0x19a
if-eq v0, v1, :cond_2
const/16 v1, 0x19e
if-eq v0, v1, :cond_2
const/16 v1, 0x1f5
if-eq v0, v1, :cond_2
const/16 v1, 0xcb
if-eq v0, v1, :cond_2
const/16 v1, 0xcc
if-eq v0, v1, :cond_2
const/16 v1, 0x133
if-eq v0, v1, :cond_0
const/16 v1, 0x134
if-eq v0, v1, :cond_2
const/16 v1, 0x194
if-eq v0, v1, :cond_2
const/16 v1, 0x195
if-eq v0, v1, :cond_2
packed-switch v0, :pswitch_data_0
goto :goto_0
:cond_0
:pswitch_0
const-string v0, "Expires"
.line 86
invoke-virtual {p0, v0}, Lokhttp3/Response;->header(Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
if-nez v0, :cond_2
.line 87
invoke-virtual {p0}, Lokhttp3/Response;->cacheControl()Lokhttp3/CacheControl;
move-result-object v0
invoke-virtual {v0}, Lokhttp3/CacheControl;->maxAgeSeconds()I
move-result v0
const/4 v1, -0x1
if-ne v0, v1, :cond_2
.line 88
invoke-virtual {p0}, Lokhttp3/Response;->cacheControl()Lokhttp3/CacheControl;
move-result-object v0
invoke-virtual {v0}, Lokhttp3/CacheControl;->isPublic()Z
move-result v0
if-nez v0, :cond_2
.line 89
invoke-virtual {p0}, Lokhttp3/Response;->cacheControl()Lokhttp3/CacheControl;
move-result-object v0
invoke-virtual {v0}, Lokhttp3/CacheControl;->isPrivate()Z
move-result v0
if-eqz v0, :cond_1
goto :goto_1
:cond_1
:goto_0
return v2
.line 100
:cond_2
:goto_1
:pswitch_1
invoke-virtual {p0}, Lokhttp3/Response;->cacheControl()Lokhttp3/CacheControl;
move-result-object p0
invoke-virtual {p0}, Lokhttp3/CacheControl;->noStore()Z
move-result p0
if-nez p0, :cond_3
invoke-virtual {p1}, Lokhttp3/Request;->cacheControl()Lokhttp3/CacheControl;
move-result-object p0
invoke-virtual {p0}, Lokhttp3/CacheControl;->noStore()Z
move-result p0
if-nez p0, :cond_3
const/4 v2, 0x1
:cond_3
return v2
:pswitch_data_0
.packed-switch 0x12c
:pswitch_1
:pswitch_1
:pswitch_0
.end packed-switch
.end method

View File

@@ -0,0 +1,152 @@
.class public Lokhttp3/internal/cache/DiskLruCache$1;
.super Ljava/lang/Object;
.source "SourceFile"
# interfaces
.implements Ljava/lang/Runnable;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lokhttp3/internal/cache/DiskLruCache;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1
name = null
.end annotation
# instance fields
.field public final synthetic this$0:Lokhttp3/internal/cache/DiskLruCache;
# direct methods
.method public constructor <init>(Lokhttp3/internal/cache/DiskLruCache;)V
.locals 0
iput-object p1, p0, Lokhttp3/internal/cache/DiskLruCache$1;->this$0:Lokhttp3/internal/cache/DiskLruCache;
.line 169
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public run()V
.locals 6
iget-object v0, p0, Lokhttp3/internal/cache/DiskLruCache$1;->this$0:Lokhttp3/internal/cache/DiskLruCache;
.line 171
monitor-enter v0
:try_start_0
iget-object v1, p0, Lokhttp3/internal/cache/DiskLruCache$1;->this$0:Lokhttp3/internal/cache/DiskLruCache;
.line 172
iget-boolean v2, v1, Lokhttp3/internal/cache/DiskLruCache;->initialized:Z
const/4 v3, 0x0
const/4 v4, 0x1
xor-int/2addr v2, v4
iget-boolean v5, v1, Lokhttp3/internal/cache/DiskLruCache;->closed:Z
or-int/2addr v2, v5
if-eqz v2, :cond_0
.line 173
monitor-exit v0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
return-void
:catchall_0
move-exception v1
goto :goto_2
.line 177
:cond_0
:try_start_1
invoke-virtual {v1}, Lokhttp3/internal/cache/DiskLruCache;->trimToSize()V
:try_end_1
.catch Ljava/io/IOException; {:try_start_1 .. :try_end_1} :catch_0
.catchall {:try_start_1 .. :try_end_1} :catchall_0
goto :goto_0
:catch_0
:try_start_2
iget-object v1, p0, Lokhttp3/internal/cache/DiskLruCache$1;->this$0:Lokhttp3/internal/cache/DiskLruCache;
.line 179
iput-boolean v4, v1, Lokhttp3/internal/cache/DiskLruCache;->mostRecentTrimFailed:Z
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
:goto_0
:try_start_3
iget-object v1, p0, Lokhttp3/internal/cache/DiskLruCache$1;->this$0:Lokhttp3/internal/cache/DiskLruCache;
.line 183
invoke-virtual {v1}, Lokhttp3/internal/cache/DiskLruCache;->journalRebuildRequired()Z
move-result v1
if-eqz v1, :cond_1
iget-object v1, p0, Lokhttp3/internal/cache/DiskLruCache$1;->this$0:Lokhttp3/internal/cache/DiskLruCache;
.line 184
invoke-virtual {v1}, Lokhttp3/internal/cache/DiskLruCache;->rebuildJournal()V
iget-object v1, p0, Lokhttp3/internal/cache/DiskLruCache$1;->this$0:Lokhttp3/internal/cache/DiskLruCache;
.line 185
iput v3, v1, Lokhttp3/internal/cache/DiskLruCache;->redundantOpCount:I
:try_end_3
.catch Ljava/io/IOException; {:try_start_3 .. :try_end_3} :catch_1
.catchall {:try_start_3 .. :try_end_3} :catchall_0
goto :goto_1
:catch_1
:try_start_4
iget-object v1, p0, Lokhttp3/internal/cache/DiskLruCache$1;->this$0:Lokhttp3/internal/cache/DiskLruCache;
.line 188
iput-boolean v4, v1, Lokhttp3/internal/cache/DiskLruCache;->mostRecentRebuildFailed:Z
.line 189
invoke-static {}, Lokio/Okio;->blackhole()Lokio/Sink;
move-result-object v2
invoke-static {v2}, Lokio/Okio;->buffer(Lokio/Sink;)Lokio/BufferedSink;
move-result-object v2
iput-object v2, v1, Lokhttp3/internal/cache/DiskLruCache;->journalWriter:Lokio/BufferedSink;
.line 191
:cond_1
:goto_1
monitor-exit v0
return-void
:goto_2
monitor-exit v0
:try_end_4
.catchall {:try_start_4 .. :try_end_4} :catchall_0
throw v1
.end method

View File

@@ -0,0 +1,52 @@
.class public Lokhttp3/internal/cache/DiskLruCache$2;
.super Lokhttp3/internal/cache/FaultHidingSink;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lokhttp3/internal/cache/DiskLruCache;->newJournalWriter()Lokio/BufferedSink;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1
name = null
.end annotation
# instance fields
.field public final synthetic this$0:Lokhttp3/internal/cache/DiskLruCache;
# direct methods
.method static constructor <clinit>()V
.locals 0
return-void
.end method
.method public constructor <init>(Lokhttp3/internal/cache/DiskLruCache;Lokio/Sink;)V
.locals 0
iput-object p1, p0, Lokhttp3/internal/cache/DiskLruCache$2;->this$0:Lokhttp3/internal/cache/DiskLruCache;
.line 313
invoke-direct {p0, p2}, Lokhttp3/internal/cache/FaultHidingSink;-><init>(Lokio/Sink;)V
return-void
.end method
# virtual methods
.method public onException(Ljava/io/IOException;)V
.locals 1
iget-object p1, p0, Lokhttp3/internal/cache/DiskLruCache$2;->this$0:Lokhttp3/internal/cache/DiskLruCache;
const/4 v0, 0x1
.line 316
iput-boolean v0, p1, Lokhttp3/internal/cache/DiskLruCache;->hasJournalErrors:Z
return-void
.end method

View File

@@ -0,0 +1,64 @@
.class public Lokhttp3/internal/cache/DiskLruCache$Editor$1;
.super Lokhttp3/internal/cache/FaultHidingSink;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lokhttp3/internal/cache/DiskLruCache$Editor;->newSink(I)Lokio/Sink;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1
name = null
.end annotation
# instance fields
.field public final synthetic this$1:Lokhttp3/internal/cache/DiskLruCache$Editor;
# direct methods
.method public constructor <init>(Lokhttp3/internal/cache/DiskLruCache$Editor;Lokio/Sink;)V
.locals 0
iput-object p1, p0, Lokhttp3/internal/cache/DiskLruCache$Editor$1;->this$1:Lokhttp3/internal/cache/DiskLruCache$Editor;
.line 898
invoke-direct {p0, p2}, Lokhttp3/internal/cache/FaultHidingSink;-><init>(Lokio/Sink;)V
return-void
.end method
# virtual methods
.method public onException(Ljava/io/IOException;)V
.locals 1
iget-object p1, p0, Lokhttp3/internal/cache/DiskLruCache$Editor$1;->this$1:Lokhttp3/internal/cache/DiskLruCache$Editor;
.line 900
iget-object p1, p1, Lokhttp3/internal/cache/DiskLruCache$Editor;->this$0:Lokhttp3/internal/cache/DiskLruCache;
monitor-enter p1
:try_start_0
iget-object v0, p0, Lokhttp3/internal/cache/DiskLruCache$Editor$1;->this$1:Lokhttp3/internal/cache/DiskLruCache$Editor;
.line 901
invoke-virtual {v0}, Lokhttp3/internal/cache/DiskLruCache$Editor;->detach()V
.line 902
monitor-exit p1
return-void
:catchall_0
move-exception v0
monitor-exit p1
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
throw v0
.end method

View File

@@ -0,0 +1,336 @@
.class public final Lokhttp3/internal/cache/DiskLruCache$Editor;
.super Ljava/lang/Object;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lokhttp3/internal/cache/DiskLruCache;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x11
name = "Editor"
.end annotation
# instance fields
.field public done:Z
.field public final entry:Lokhttp3/internal/cache/DiskLruCache$Entry;
.field public final synthetic this$0:Lokhttp3/internal/cache/DiskLruCache;
.field public final written:[Z
# direct methods
.method public constructor <init>(Lokhttp3/internal/cache/DiskLruCache;Lokhttp3/internal/cache/DiskLruCache$Entry;)V
.locals 0
iput-object p1, p0, Lokhttp3/internal/cache/DiskLruCache$Editor;->this$0:Lokhttp3/internal/cache/DiskLruCache;
.line 831
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p2, p0, Lokhttp3/internal/cache/DiskLruCache$Editor;->entry:Lokhttp3/internal/cache/DiskLruCache$Entry;
.line 833
iget-boolean p2, p2, Lokhttp3/internal/cache/DiskLruCache$Entry;->readable:Z
if-eqz p2, :cond_0
const/4 p1, 0x0
goto :goto_0
:cond_0
iget p1, p1, Lokhttp3/internal/cache/DiskLruCache;->valueCount:I
new-array p1, p1, [Z
:goto_0
iput-object p1, p0, Lokhttp3/internal/cache/DiskLruCache$Editor;->written:[Z
return-void
.end method
# virtual methods
.method public abort()V
.locals 3
iget-object v0, p0, Lokhttp3/internal/cache/DiskLruCache$Editor;->this$0:Lokhttp3/internal/cache/DiskLruCache;
.line 929
monitor-enter v0
:try_start_0
iget-boolean v1, p0, Lokhttp3/internal/cache/DiskLruCache$Editor;->done:Z
if-nez v1, :cond_1
iget-object v1, p0, Lokhttp3/internal/cache/DiskLruCache$Editor;->entry:Lokhttp3/internal/cache/DiskLruCache$Entry;
.line 933
iget-object v1, v1, Lokhttp3/internal/cache/DiskLruCache$Entry;->currentEditor:Lokhttp3/internal/cache/DiskLruCache$Editor;
if-ne v1, p0, :cond_0
iget-object v1, p0, Lokhttp3/internal/cache/DiskLruCache$Editor;->this$0:Lokhttp3/internal/cache/DiskLruCache;
const/4 v2, 0x0
.line 934
invoke-virtual {v1, p0, v2}, Lokhttp3/internal/cache/DiskLruCache;->completeEdit(Lokhttp3/internal/cache/DiskLruCache$Editor;Z)V
goto :goto_0
:catchall_0
move-exception v1
goto :goto_1
:cond_0
:goto_0
const/4 v1, 0x1
iput-boolean v1, p0, Lokhttp3/internal/cache/DiskLruCache$Editor;->done:Z
.line 937
monitor-exit v0
return-void
.line 931
:cond_1
new-instance v1, Ljava/lang/IllegalStateException;
invoke-direct {v1}, Ljava/lang/IllegalStateException;-><init>()V
throw v1
.line 937
:goto_1
monitor-exit v0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
throw v1
.end method
.method public commit()V
.locals 3
iget-object v0, p0, Lokhttp3/internal/cache/DiskLruCache$Editor;->this$0:Lokhttp3/internal/cache/DiskLruCache;
.line 913
monitor-enter v0
:try_start_0
iget-boolean v1, p0, Lokhttp3/internal/cache/DiskLruCache$Editor;->done:Z
if-nez v1, :cond_1
iget-object v1, p0, Lokhttp3/internal/cache/DiskLruCache$Editor;->entry:Lokhttp3/internal/cache/DiskLruCache$Entry;
.line 917
iget-object v1, v1, Lokhttp3/internal/cache/DiskLruCache$Entry;->currentEditor:Lokhttp3/internal/cache/DiskLruCache$Editor;
const/4 v2, 0x1
if-ne v1, p0, :cond_0
iget-object v1, p0, Lokhttp3/internal/cache/DiskLruCache$Editor;->this$0:Lokhttp3/internal/cache/DiskLruCache;
.line 918
invoke-virtual {v1, p0, v2}, Lokhttp3/internal/cache/DiskLruCache;->completeEdit(Lokhttp3/internal/cache/DiskLruCache$Editor;Z)V
goto :goto_0
:catchall_0
move-exception v1
goto :goto_1
:cond_0
:goto_0
iput-boolean v2, p0, Lokhttp3/internal/cache/DiskLruCache$Editor;->done:Z
.line 921
monitor-exit v0
return-void
.line 915
:cond_1
new-instance v1, Ljava/lang/IllegalStateException;
invoke-direct {v1}, Ljava/lang/IllegalStateException;-><init>()V
throw v1
.line 921
:goto_1
monitor-exit v0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
throw v1
.end method
.method public detach()V
.locals 3
iget-object v0, p0, Lokhttp3/internal/cache/DiskLruCache$Editor;->entry:Lokhttp3/internal/cache/DiskLruCache$Entry;
.line 843
iget-object v0, v0, Lokhttp3/internal/cache/DiskLruCache$Entry;->currentEditor:Lokhttp3/internal/cache/DiskLruCache$Editor;
if-ne v0, p0, :cond_1
const/4 v0, 0x0
:goto_0
iget-object v1, p0, Lokhttp3/internal/cache/DiskLruCache$Editor;->this$0:Lokhttp3/internal/cache/DiskLruCache;
.line 844
iget v2, v1, Lokhttp3/internal/cache/DiskLruCache;->valueCount:I
if-ge v0, v2, :cond_0
.line 846
:try_start_0
iget-object v1, v1, Lokhttp3/internal/cache/DiskLruCache;->fileSystem:Lokhttp3/internal/io/FileSystem;
iget-object v2, p0, Lokhttp3/internal/cache/DiskLruCache$Editor;->entry:Lokhttp3/internal/cache/DiskLruCache$Entry;
iget-object v2, v2, Lokhttp3/internal/cache/DiskLruCache$Entry;->dirtyFiles:[Ljava/io/File;
aget-object v2, v2, v0
invoke-interface {v1, v2}, Lokhttp3/internal/io/FileSystem;->delete(Ljava/io/File;)V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
:catch_0
add-int/lit8 v0, v0, 0x1
goto :goto_0
:cond_0
iget-object v0, p0, Lokhttp3/internal/cache/DiskLruCache$Editor;->entry:Lokhttp3/internal/cache/DiskLruCache$Entry;
const/4 v1, 0x0
.line 851
iput-object v1, v0, Lokhttp3/internal/cache/DiskLruCache$Entry;->currentEditor:Lokhttp3/internal/cache/DiskLruCache$Editor;
:cond_1
return-void
.end method
.method public newSink(I)Lokio/Sink;
.locals 4
iget-object v0, p0, Lokhttp3/internal/cache/DiskLruCache$Editor;->this$0:Lokhttp3/internal/cache/DiskLruCache;
.line 881
monitor-enter v0
:try_start_0
iget-boolean v1, p0, Lokhttp3/internal/cache/DiskLruCache$Editor;->done:Z
if-nez v1, :cond_2
iget-object v1, p0, Lokhttp3/internal/cache/DiskLruCache$Editor;->entry:Lokhttp3/internal/cache/DiskLruCache$Entry;
.line 885
iget-object v2, v1, Lokhttp3/internal/cache/DiskLruCache$Entry;->currentEditor:Lokhttp3/internal/cache/DiskLruCache$Editor;
if-eq v2, p0, :cond_0
.line 886
invoke-static {}, Lokio/Okio;->blackhole()Lokio/Sink;
move-result-object p1
monitor-exit v0
return-object p1
:catchall_0
move-exception p1
goto :goto_0
.line 888
:cond_0
iget-boolean v2, v1, Lokhttp3/internal/cache/DiskLruCache$Entry;->readable:Z
if-nez v2, :cond_1
iget-object v2, p0, Lokhttp3/internal/cache/DiskLruCache$Editor;->written:[Z
const/4 v3, 0x1
.line 889
aput-boolean v3, v2, p1
.line 891
:cond_1
iget-object v1, v1, Lokhttp3/internal/cache/DiskLruCache$Entry;->dirtyFiles:[Ljava/io/File;
aget-object p1, v1, p1
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
:try_start_1
iget-object v1, p0, Lokhttp3/internal/cache/DiskLruCache$Editor;->this$0:Lokhttp3/internal/cache/DiskLruCache;
.line 894
iget-object v1, v1, Lokhttp3/internal/cache/DiskLruCache;->fileSystem:Lokhttp3/internal/io/FileSystem;
invoke-interface {v1, p1}, Lokhttp3/internal/io/FileSystem;->sink(Ljava/io/File;)Lokio/Sink;
move-result-object p1
:try_end_1
.catch Ljava/io/FileNotFoundException; {:try_start_1 .. :try_end_1} :catch_0
.catchall {:try_start_1 .. :try_end_1} :catchall_0
.line 898
:try_start_2
new-instance v1, Lokhttp3/internal/cache/DiskLruCache$Editor$1;
invoke-direct {v1, p0, p1}, Lokhttp3/internal/cache/DiskLruCache$Editor$1;-><init>(Lokhttp3/internal/cache/DiskLruCache$Editor;Lokio/Sink;)V
monitor-exit v0
return-object v1
.line 896
:catch_0
invoke-static {}, Lokio/Okio;->blackhole()Lokio/Sink;
move-result-object p1
monitor-exit v0
return-object p1
.line 883
:cond_2
new-instance p1, Ljava/lang/IllegalStateException;
invoke-direct {p1}, Ljava/lang/IllegalStateException;-><init>()V
throw p1
.line 905
:goto_0
monitor-exit v0
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
throw p1
.end method

View File

@@ -0,0 +1,373 @@
.class public final Lokhttp3/internal/cache/DiskLruCache$Entry;
.super Ljava/lang/Object;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lokhttp3/internal/cache/DiskLruCache;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x11
name = "Entry"
.end annotation
# instance fields
.field public final cleanFiles:[Ljava/io/File;
.field public currentEditor:Lokhttp3/internal/cache/DiskLruCache$Editor;
.field public final dirtyFiles:[Ljava/io/File;
.field public final key:Ljava/lang/String;
.field public final lengths:[J
.field public readable:Z
.field public sequenceNumber:J
.field public final synthetic this$0:Lokhttp3/internal/cache/DiskLruCache;
# direct methods
.method public constructor <init>(Lokhttp3/internal/cache/DiskLruCache;Ljava/lang/String;)V
.locals 6
iput-object p1, p0, Lokhttp3/internal/cache/DiskLruCache$Entry;->this$0:Lokhttp3/internal/cache/DiskLruCache;
.line 969
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p2, p0, Lokhttp3/internal/cache/DiskLruCache$Entry;->key:Ljava/lang/String;
.line 972
iget v0, p1, Lokhttp3/internal/cache/DiskLruCache;->valueCount:I
new-array v1, v0, [J
iput-object v1, p0, Lokhttp3/internal/cache/DiskLruCache$Entry;->lengths:[J
.line 973
new-array v1, v0, [Ljava/io/File;
iput-object v1, p0, Lokhttp3/internal/cache/DiskLruCache$Entry;->cleanFiles:[Ljava/io/File;
.line 974
new-array v0, v0, [Ljava/io/File;
iput-object v0, p0, Lokhttp3/internal/cache/DiskLruCache$Entry;->dirtyFiles:[Ljava/io/File;
.line 977
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0, p2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
const/16 p2, 0x2e
invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
.line 978
invoke-virtual {v0}, Ljava/lang/StringBuilder;->length()I
move-result p2
const/4 v1, 0x0
.line 979
:goto_0
iget v2, p1, Lokhttp3/internal/cache/DiskLruCache;->valueCount:I
if-ge v1, v2, :cond_0
.line 980
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
iget-object v2, p0, Lokhttp3/internal/cache/DiskLruCache$Entry;->cleanFiles:[Ljava/io/File;
.line 981
new-instance v3, Ljava/io/File;
iget-object v4, p1, Lokhttp3/internal/cache/DiskLruCache;->directory:Ljava/io/File;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v5
invoke-direct {v3, v4, v5}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
aput-object v3, v2, v1
const-string v2, ".tmp"
.line 982
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object v2, p0, Lokhttp3/internal/cache/DiskLruCache$Entry;->dirtyFiles:[Ljava/io/File;
.line 983
new-instance v3, Ljava/io/File;
iget-object v4, p1, Lokhttp3/internal/cache/DiskLruCache;->directory:Ljava/io/File;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v5
invoke-direct {v3, v4, v5}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
aput-object v3, v2, v1
.line 984
invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->setLength(I)V
add-int/lit8 v1, v1, 0x1
goto :goto_0
:cond_0
return-void
.end method
# virtual methods
.method public final invalidLengths([Ljava/lang/String;)Ljava/io/IOException;
.locals 3
.line 1011
new-instance v0, Ljava/io/IOException;
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "unexpected journal line: "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-static {p1}, Ljava/util/Arrays;->toString([Ljava/lang/Object;)Ljava/lang/String;
move-result-object p1
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {v0, p1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
throw v0
.end method
.method public setLengths([Ljava/lang/String;)V
.locals 4
.line 990
array-length v0, p1
iget-object v1, p0, Lokhttp3/internal/cache/DiskLruCache$Entry;->this$0:Lokhttp3/internal/cache/DiskLruCache;
iget v1, v1, Lokhttp3/internal/cache/DiskLruCache;->valueCount:I
if-ne v0, v1, :cond_1
const/4 v0, 0x0
.line 995
:goto_0
:try_start_0
array-length v1, p1
if-ge v0, v1, :cond_0
iget-object v1, p0, Lokhttp3/internal/cache/DiskLruCache$Entry;->lengths:[J
.line 996
aget-object v2, p1, v0
invoke-static {v2}, Ljava/lang/Long;->parseLong(Ljava/lang/String;)J
move-result-wide v2
aput-wide v2, v1, v0
:try_end_0
.catch Ljava/lang/NumberFormatException; {:try_start_0 .. :try_end_0} :catch_0
add-int/lit8 v0, v0, 0x1
goto :goto_0
:cond_0
return-void
.line 999
:catch_0
invoke-virtual {p0, p1}, Lokhttp3/internal/cache/DiskLruCache$Entry;->invalidLengths([Ljava/lang/String;)Ljava/io/IOException;
move-result-object p1
throw p1
.line 991
:cond_1
invoke-virtual {p0, p1}, Lokhttp3/internal/cache/DiskLruCache$Entry;->invalidLengths([Ljava/lang/String;)Ljava/io/IOException;
move-result-object p1
throw p1
.end method
.method public snapshot()Lokhttp3/internal/cache/DiskLruCache$Snapshot;
.locals 10
iget-object v0, p0, Lokhttp3/internal/cache/DiskLruCache$Entry;->this$0:Lokhttp3/internal/cache/DiskLruCache;
.line 1020
invoke-static {v0}, Ljava/lang/Thread;->holdsLock(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_2
iget-object v0, p0, Lokhttp3/internal/cache/DiskLruCache$Entry;->this$0:Lokhttp3/internal/cache/DiskLruCache;
.line 1022
iget v0, v0, Lokhttp3/internal/cache/DiskLruCache;->valueCount:I
new-array v0, v0, [Lokio/Source;
iget-object v1, p0, Lokhttp3/internal/cache/DiskLruCache$Entry;->lengths:[J
.line 1023
invoke-virtual {v1}, [J->clone()Ljava/lang/Object;
move-result-object v1
move-object v7, v1
check-cast v7, [J
const/4 v8, 0x0
move v1, v8
:goto_0
:try_start_0
iget-object v2, p0, Lokhttp3/internal/cache/DiskLruCache$Entry;->this$0:Lokhttp3/internal/cache/DiskLruCache;
.line 1025
iget v3, v2, Lokhttp3/internal/cache/DiskLruCache;->valueCount:I
if-ge v1, v3, :cond_0
.line 1026
iget-object v2, v2, Lokhttp3/internal/cache/DiskLruCache;->fileSystem:Lokhttp3/internal/io/FileSystem;
iget-object v3, p0, Lokhttp3/internal/cache/DiskLruCache$Entry;->cleanFiles:[Ljava/io/File;
aget-object v3, v3, v1
invoke-interface {v2, v3}, Lokhttp3/internal/io/FileSystem;->source(Ljava/io/File;)Lokio/Source;
move-result-object v2
aput-object v2, v0, v1
add-int/lit8 v1, v1, 0x1
goto :goto_0
.line 1028
:cond_0
new-instance v9, Lokhttp3/internal/cache/DiskLruCache$Snapshot;
iget-object v3, p0, Lokhttp3/internal/cache/DiskLruCache$Entry;->key:Ljava/lang/String;
iget-wide v4, p0, Lokhttp3/internal/cache/DiskLruCache$Entry;->sequenceNumber:J
move-object v1, v9
move-object v6, v0
invoke-direct/range {v1 .. v7}, Lokhttp3/internal/cache/DiskLruCache$Snapshot;-><init>(Lokhttp3/internal/cache/DiskLruCache;Ljava/lang/String;J[Lokio/Source;[J)V
:try_end_0
.catch Ljava/io/FileNotFoundException; {:try_start_0 .. :try_end_0} :catch_0
return-object v9
:catch_0
:goto_1
iget-object v1, p0, Lokhttp3/internal/cache/DiskLruCache$Entry;->this$0:Lokhttp3/internal/cache/DiskLruCache;
.line 1031
iget v2, v1, Lokhttp3/internal/cache/DiskLruCache;->valueCount:I
if-ge v8, v2, :cond_1
.line 1032
aget-object v2, v0, v8
if-eqz v2, :cond_1
.line 1033
invoke-static {v2}, Lokhttp3/internal/Util;->closeQuietly(Ljava/io/Closeable;)V
add-int/lit8 v8, v8, 0x1
goto :goto_1
.line 1041
:cond_1
:try_start_1
invoke-virtual {v1, p0}, Lokhttp3/internal/cache/DiskLruCache;->removeEntry(Lokhttp3/internal/cache/DiskLruCache$Entry;)Z
:try_end_1
.catch Ljava/io/IOException; {:try_start_1 .. :try_end_1} :catch_1
:catch_1
const/4 v0, 0x0
return-object v0
.line 1020
:cond_2
new-instance v0, Ljava/lang/AssertionError;
invoke-direct {v0}, Ljava/lang/AssertionError;-><init>()V
throw v0
.end method
.method public writeLengths(Lokio/BufferedSink;)V
.locals 6
iget-object v0, p0, Lokhttp3/internal/cache/DiskLruCache$Entry;->lengths:[J
.line 1005
array-length v1, v0
const/4 v2, 0x0
:goto_0
if-ge v2, v1, :cond_0
aget-wide v3, v0, v2
const/16 v5, 0x20
.line 1006
invoke-interface {p1, v5}, Lokio/BufferedSink;->writeByte(I)Lokio/BufferedSink;
move-result-object v5
invoke-interface {v5, v3, v4}, Lokio/BufferedSink;->writeDecimalLong(J)Lokio/BufferedSink;
add-int/lit8 v2, v2, 0x1
goto :goto_0
:cond_0
return-void
.end method

View File

@@ -0,0 +1,106 @@
.class public final Lokhttp3/internal/cache/DiskLruCache$Snapshot;
.super Ljava/lang/Object;
.source "SourceFile"
# interfaces
.implements Ljava/io/Closeable;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lokhttp3/internal/cache/DiskLruCache;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x11
name = "Snapshot"
.end annotation
# instance fields
.field public final key:Ljava/lang/String;
.field public final lengths:[J
.field public final sequenceNumber:J
.field public final sources:[Lokio/Source;
.field public final synthetic this$0:Lokhttp3/internal/cache/DiskLruCache;
# direct methods
.method public constructor <init>(Lokhttp3/internal/cache/DiskLruCache;Ljava/lang/String;J[Lokio/Source;[J)V
.locals 0
iput-object p1, p0, Lokhttp3/internal/cache/DiskLruCache$Snapshot;->this$0:Lokhttp3/internal/cache/DiskLruCache;
.line 789
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p2, p0, Lokhttp3/internal/cache/DiskLruCache$Snapshot;->key:Ljava/lang/String;
iput-wide p3, p0, Lokhttp3/internal/cache/DiskLruCache$Snapshot;->sequenceNumber:J
iput-object p5, p0, Lokhttp3/internal/cache/DiskLruCache$Snapshot;->sources:[Lokio/Source;
iput-object p6, p0, Lokhttp3/internal/cache/DiskLruCache$Snapshot;->lengths:[J
return-void
.end method
# virtual methods
.method public close()V
.locals 4
iget-object v0, p0, Lokhttp3/internal/cache/DiskLruCache$Snapshot;->sources:[Lokio/Source;
.line 819
array-length v1, v0
const/4 v2, 0x0
:goto_0
if-ge v2, v1, :cond_0
aget-object v3, v0, v2
.line 820
invoke-static {v3}, Lokhttp3/internal/Util;->closeQuietly(Ljava/io/Closeable;)V
add-int/lit8 v2, v2, 0x1
goto :goto_0
:cond_0
return-void
.end method
.method public edit()Lokhttp3/internal/cache/DiskLruCache$Editor;
.locals 4
iget-object v0, p0, Lokhttp3/internal/cache/DiskLruCache$Snapshot;->this$0:Lokhttp3/internal/cache/DiskLruCache;
iget-object v1, p0, Lokhttp3/internal/cache/DiskLruCache$Snapshot;->key:Ljava/lang/String;
iget-wide v2, p0, Lokhttp3/internal/cache/DiskLruCache$Snapshot;->sequenceNumber:J
.line 805
invoke-virtual {v0, v1, v2, v3}, Lokhttp3/internal/cache/DiskLruCache;->edit(Ljava/lang/String;J)Lokhttp3/internal/cache/DiskLruCache$Editor;
move-result-object v0
return-object v0
.end method
.method public getSource(I)Lokio/Source;
.locals 1
iget-object v0, p0, Lokhttp3/internal/cache/DiskLruCache$Snapshot;->sources:[Lokio/Source;
.line 810
aget-object p1, v0, p1
return-object p1
.end method

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,122 @@
.class public abstract Lokhttp3/internal/cache/FaultHidingSink;
.super Lokio/ForwardingSink;
.source "SourceFile"
# instance fields
.field public hasErrors:Z
# direct methods
.method public constructor <init>(Lokio/Sink;)V
.locals 0
.line 28
invoke-direct {p0, p1}, Lokio/ForwardingSink;-><init>(Lokio/Sink;)V
return-void
.end method
# virtual methods
.method public close()V
.locals 2
iget-boolean v0, p0, Lokhttp3/internal/cache/FaultHidingSink;->hasErrors:Z
if-eqz v0, :cond_0
return-void
.line 57
:cond_0
:try_start_0
invoke-super {p0}, Lokio/ForwardingSink;->close()V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
goto :goto_0
:catch_0
move-exception v0
const/4 v1, 0x1
iput-boolean v1, p0, Lokhttp3/internal/cache/FaultHidingSink;->hasErrors:Z
.line 60
invoke-virtual {p0, v0}, Lokhttp3/internal/cache/FaultHidingSink;->onException(Ljava/io/IOException;)V
:goto_0
return-void
.end method
.method public flush()V
.locals 2
iget-boolean v0, p0, Lokhttp3/internal/cache/FaultHidingSink;->hasErrors:Z
if-eqz v0, :cond_0
return-void
.line 47
:cond_0
:try_start_0
invoke-super {p0}, Lokio/ForwardingSink;->flush()V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
goto :goto_0
:catch_0
move-exception v0
const/4 v1, 0x1
iput-boolean v1, p0, Lokhttp3/internal/cache/FaultHidingSink;->hasErrors:Z
.line 50
invoke-virtual {p0, v0}, Lokhttp3/internal/cache/FaultHidingSink;->onException(Ljava/io/IOException;)V
:goto_0
return-void
.end method
.method public abstract onException(Ljava/io/IOException;)V
.end method
.method public write(Lokio/Buffer;J)V
.locals 1
iget-boolean v0, p0, Lokhttp3/internal/cache/FaultHidingSink;->hasErrors:Z
if-eqz v0, :cond_0
.line 33
invoke-virtual {p1, p2, p3}, Lokio/Buffer;->skip(J)V
return-void
.line 37
:cond_0
:try_start_0
invoke-super {p0, p1, p2, p3}, Lokio/ForwardingSink;->write(Lokio/Buffer;J)V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
goto :goto_0
:catch_0
move-exception p1
const/4 p2, 0x1
iput-boolean p2, p0, Lokhttp3/internal/cache/FaultHidingSink;->hasErrors:Z
.line 40
invoke-virtual {p0, p1}, Lokhttp3/internal/cache/FaultHidingSink;->onException(Ljava/io/IOException;)V
:goto_0
return-void
.end method

View File

@@ -0,0 +1,23 @@
.class public interface abstract Lokhttp3/internal/cache/InternalCache;
.super Ljava/lang/Object;
.source "SourceFile"
# virtual methods
.method public abstract get(Lokhttp3/Request;)Lokhttp3/Response;
.end method
.method public abstract put(Lokhttp3/Response;)Lokhttp3/internal/cache/CacheRequest;
.end method
.method public abstract remove(Lokhttp3/Request;)V
.end method
.method public abstract trackConditionalCacheHit()V
.end method
.method public abstract trackResponse(Lokhttp3/internal/cache/CacheStrategy;)V
.end method
.method public abstract update(Lokhttp3/Response;Lokhttp3/Response;)V
.end method

View File

@@ -0,0 +1,69 @@
.class public final Lokhttp3/internal/connection/ConnectInterceptor;
.super Ljava/lang/Object;
.source "SourceFile"
# interfaces
.implements Lokhttp3/Interceptor;
# instance fields
.field public final client:Lokhttp3/OkHttpClient;
# direct methods
.method public constructor <init>(Lokhttp3/OkHttpClient;)V
.locals 0
.line 30
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Lokhttp3/internal/connection/ConnectInterceptor;->client:Lokhttp3/OkHttpClient;
return-void
.end method
# virtual methods
.method public intercept(Lokhttp3/Interceptor$Chain;)Lokhttp3/Response;
.locals 5
.line 35
move-object v0, p1
check-cast v0, Lokhttp3/internal/http/RealInterceptorChain;
.line 36
invoke-virtual {v0}, Lokhttp3/internal/http/RealInterceptorChain;->request()Lokhttp3/Request;
move-result-object v1
.line 37
invoke-virtual {v0}, Lokhttp3/internal/http/RealInterceptorChain;->transmitter()Lokhttp3/internal/connection/Transmitter;
move-result-object v2
.line 40
invoke-virtual {v1}, Lokhttp3/Request;->method()Ljava/lang/String;
move-result-object v3
const-string v4, "GET"
invoke-virtual {v3, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v3
xor-int/lit8 v3, v3, 0x1
.line 41
invoke-virtual {v2, p1, v3}, Lokhttp3/internal/connection/Transmitter;->newExchange(Lokhttp3/Interceptor$Chain;Z)Lokhttp3/internal/connection/Exchange;
move-result-object p1
.line 43
invoke-virtual {v0, v1, v2, p1}, Lokhttp3/internal/http/RealInterceptorChain;->proceed(Lokhttp3/Request;Lokhttp3/internal/connection/Transmitter;Lokhttp3/internal/connection/Exchange;)Lokhttp3/Response;
move-result-object p1
return-object p1
.end method

View File

@@ -0,0 +1,252 @@
.class public final Lokhttp3/internal/connection/ConnectionSpecSelector;
.super Ljava/lang/Object;
.source "SourceFile"
# instance fields
.field public final connectionSpecs:Ljava/util/List;
.field public isFallback:Z
.field public isFallbackPossible:Z
.field public nextModeIndex:I
# direct methods
.method public constructor <init>(Ljava/util/List;)V
.locals 1
.line 43
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
const/4 v0, 0x0
iput v0, p0, Lokhttp3/internal/connection/ConnectionSpecSelector;->nextModeIndex:I
iput-object p1, p0, Lokhttp3/internal/connection/ConnectionSpecSelector;->connectionSpecs:Ljava/util/List;
return-void
.end method
# virtual methods
.method public configureSecureSocket(Ljavax/net/ssl/SSLSocket;)Lokhttp3/ConnectionSpec;
.locals 4
iget v0, p0, Lokhttp3/internal/connection/ConnectionSpecSelector;->nextModeIndex:I
iget-object v1, p0, Lokhttp3/internal/connection/ConnectionSpecSelector;->connectionSpecs:Ljava/util/List;
.line 56
invoke-interface {v1}, Ljava/util/List;->size()I
move-result v1
:goto_0
if-ge v0, v1, :cond_1
iget-object v2, p0, Lokhttp3/internal/connection/ConnectionSpecSelector;->connectionSpecs:Ljava/util/List;
.line 57
invoke-interface {v2, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v2
check-cast v2, Lokhttp3/ConnectionSpec;
.line 58
invoke-virtual {v2, p1}, Lokhttp3/ConnectionSpec;->isCompatible(Ljavax/net/ssl/SSLSocket;)Z
move-result v3
if-eqz v3, :cond_0
add-int/lit8 v0, v0, 0x1
iput v0, p0, Lokhttp3/internal/connection/ConnectionSpecSelector;->nextModeIndex:I
goto :goto_1
:cond_0
add-int/lit8 v0, v0, 0x1
goto :goto_0
:cond_1
const/4 v2, 0x0
:goto_1
if-eqz v2, :cond_2
.line 75
invoke-virtual {p0, p1}, Lokhttp3/internal/connection/ConnectionSpecSelector;->isFallbackPossible(Ljavax/net/ssl/SSLSocket;)Z
move-result v0
iput-boolean v0, p0, Lokhttp3/internal/connection/ConnectionSpecSelector;->isFallbackPossible:Z
sget-object v0, Lokhttp3/internal/Internal;->instance:Lokhttp3/internal/Internal;
iget-boolean v1, p0, Lokhttp3/internal/connection/ConnectionSpecSelector;->isFallback:Z
.line 77
invoke-virtual {v0, v2, p1, v1}, Lokhttp3/internal/Internal;->apply(Lokhttp3/ConnectionSpec;Ljavax/net/ssl/SSLSocket;Z)V
return-object v2
.line 69
:cond_2
new-instance v0, Ljava/net/UnknownServiceException;
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "Unable to find acceptable protocols. isFallback="
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-boolean v2, p0, Lokhttp3/internal/connection/ConnectionSpecSelector;->isFallback:Z
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;
const-string v2, ", modes="
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object v2, p0, Lokhttp3/internal/connection/ConnectionSpecSelector;->connectionSpecs:Ljava/util/List;
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
const-string v2, ", supported protocols="
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
.line 72
invoke-virtual {p1}, Ljavax/net/ssl/SSLSocket;->getEnabledProtocols()[Ljava/lang/String;
move-result-object p1
invoke-static {p1}, Ljava/util/Arrays;->toString([Ljava/lang/Object;)Ljava/lang/String;
move-result-object p1
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {v0, p1}, Ljava/net/UnknownServiceException;-><init>(Ljava/lang/String;)V
throw v0
.end method
.method public connectionFailed(Ljava/io/IOException;)Z
.locals 2
const/4 v0, 0x1
iput-boolean v0, p0, Lokhttp3/internal/connection/ConnectionSpecSelector;->isFallback:Z
iget-boolean v0, p0, Lokhttp3/internal/connection/ConnectionSpecSelector;->isFallbackPossible:Z
const/4 v1, 0x0
if-nez v0, :cond_0
return v1
.line 98
:cond_0
instance-of v0, p1, Ljava/net/ProtocolException;
if-eqz v0, :cond_1
return v1
.line 105
:cond_1
instance-of v0, p1, Ljava/io/InterruptedIOException;
if-eqz v0, :cond_2
return v1
.line 111
:cond_2
instance-of v0, p1, Ljavax/net/ssl/SSLHandshakeException;
if-eqz v0, :cond_3
.line 113
invoke-virtual {p1}, Ljava/lang/Throwable;->getCause()Ljava/lang/Throwable;
move-result-object v0
instance-of v0, v0, Ljava/security/cert/CertificateException;
if-eqz v0, :cond_3
return v1
.line 117
:cond_3
instance-of v0, p1, Ljavax/net/ssl/SSLPeerUnverifiedException;
if-eqz v0, :cond_4
return v1
.line 123
:cond_4
instance-of p1, p1, Ljavax/net/ssl/SSLException;
return p1
.end method
.method public final isFallbackPossible(Ljavax/net/ssl/SSLSocket;)Z
.locals 2
iget v0, p0, Lokhttp3/internal/connection/ConnectionSpecSelector;->nextModeIndex:I
:goto_0
iget-object v1, p0, Lokhttp3/internal/connection/ConnectionSpecSelector;->connectionSpecs:Ljava/util/List;
.line 132
invoke-interface {v1}, Ljava/util/List;->size()I
move-result v1
if-ge v0, v1, :cond_1
iget-object v1, p0, Lokhttp3/internal/connection/ConnectionSpecSelector;->connectionSpecs:Ljava/util/List;
.line 133
invoke-interface {v1, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v1
check-cast v1, Lokhttp3/ConnectionSpec;
invoke-virtual {v1, p1}, Lokhttp3/ConnectionSpec;->isCompatible(Ljavax/net/ssl/SSLSocket;)Z
move-result v1
if-eqz v1, :cond_0
const/4 p1, 0x1
return p1
:cond_0
add-int/lit8 v0, v0, 0x1
goto :goto_0
:cond_1
const/4 p1, 0x0
return p1
.end method

View File

@@ -0,0 +1,259 @@
.class public final Lokhttp3/internal/connection/Exchange$RequestBodySink;
.super Lokio/ForwardingSink;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lokhttp3/internal/connection/Exchange;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x11
name = "RequestBodySink"
.end annotation
# instance fields
.field public bytesReceived:J
.field public closed:Z
.field public completed:Z
.field public contentLength:J
.field public final synthetic this$0:Lokhttp3/internal/connection/Exchange;
# direct methods
.method public constructor <init>(Lokhttp3/internal/connection/Exchange;Lokio/Sink;J)V
.locals 0
iput-object p1, p0, Lokhttp3/internal/connection/Exchange$RequestBodySink;->this$0:Lokhttp3/internal/connection/Exchange;
.line 220
invoke-direct {p0, p2}, Lokio/ForwardingSink;-><init>(Lokio/Sink;)V
iput-wide p3, p0, Lokhttp3/internal/connection/Exchange$RequestBodySink;->contentLength:J
return-void
.end method
.method private complete(Ljava/io/IOException;)Ljava/io/IOException;
.locals 7
iget-boolean v0, p0, Lokhttp3/internal/connection/Exchange$RequestBodySink;->completed:Z
if-eqz v0, :cond_0
return-object p1
:cond_0
const/4 v0, 0x1
iput-boolean v0, p0, Lokhttp3/internal/connection/Exchange$RequestBodySink;->completed:Z
iget-object v1, p0, Lokhttp3/internal/connection/Exchange$RequestBodySink;->this$0:Lokhttp3/internal/connection/Exchange;
iget-wide v2, p0, Lokhttp3/internal/connection/Exchange$RequestBodySink;->bytesReceived:J
const/4 v4, 0x0
const/4 v5, 0x1
move-object v6, p1
.line 263
invoke-virtual/range {v1 .. v6}, Lokhttp3/internal/connection/Exchange;->bodyComplete(JZZLjava/io/IOException;)Ljava/io/IOException;
move-result-object p1
return-object p1
.end method
# virtual methods
.method public close()V
.locals 4
iget-boolean v0, p0, Lokhttp3/internal/connection/Exchange$RequestBodySink;->closed:Z
if-eqz v0, :cond_0
return-void
:cond_0
const/4 v0, 0x1
iput-boolean v0, p0, Lokhttp3/internal/connection/Exchange$RequestBodySink;->closed:Z
iget-wide v0, p0, Lokhttp3/internal/connection/Exchange$RequestBodySink;->contentLength:J
const-wide/16 v2, -0x1
cmp-long v2, v0, v2
if-eqz v2, :cond_2
iget-wide v2, p0, Lokhttp3/internal/connection/Exchange$RequestBodySink;->bytesReceived:J
cmp-long v0, v2, v0
if-nez v0, :cond_1
goto :goto_0
.line 250
:cond_1
new-instance v0, Ljava/net/ProtocolException;
const-string v1, "unexpected end of stream"
invoke-direct {v0, v1}, Ljava/net/ProtocolException;-><init>(Ljava/lang/String;)V
throw v0
.line 253
:cond_2
:goto_0
:try_start_0
invoke-super {p0}, Lokio/ForwardingSink;->close()V
const/4 v0, 0x0
.line 254
invoke-direct {p0, v0}, Lokhttp3/internal/connection/Exchange$RequestBodySink;->complete(Ljava/io/IOException;)Ljava/io/IOException;
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
return-void
:catch_0
move-exception v0
.line 256
invoke-direct {p0, v0}, Lokhttp3/internal/connection/Exchange$RequestBodySink;->complete(Ljava/io/IOException;)Ljava/io/IOException;
move-result-object v0
throw v0
.end method
.method public flush()V
.locals 1
.line 240
:try_start_0
invoke-super {p0}, Lokio/ForwardingSink;->flush()V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
return-void
:catch_0
move-exception v0
.line 242
invoke-direct {p0, v0}, Lokhttp3/internal/connection/Exchange$RequestBodySink;->complete(Ljava/io/IOException;)Ljava/io/IOException;
move-result-object v0
throw v0
.end method
.method public write(Lokio/Buffer;J)V
.locals 4
iget-boolean v0, p0, Lokhttp3/internal/connection/Exchange$RequestBodySink;->closed:Z
if-nez v0, :cond_2
iget-wide v0, p0, Lokhttp3/internal/connection/Exchange$RequestBodySink;->contentLength:J
const-wide/16 v2, -0x1
cmp-long v2, v0, v2
if-eqz v2, :cond_1
iget-wide v2, p0, Lokhttp3/internal/connection/Exchange$RequestBodySink;->bytesReceived:J
add-long/2addr v2, p2
cmp-long v0, v2, v0
if-gtz v0, :cond_0
goto :goto_0
.line 227
:cond_0
new-instance p1, Ljava/net/ProtocolException;
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const-string v1, "expected "
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-wide v1, p0, Lokhttp3/internal/connection/Exchange$RequestBodySink;->contentLength:J
invoke-virtual {v0, v1, v2}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
const-string v1, " bytes but received "
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-wide v1, p0, Lokhttp3/internal/connection/Exchange$RequestBodySink;->bytesReceived:J
add-long/2addr v1, p2
invoke-virtual {v0, v1, v2}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p2
invoke-direct {p1, p2}, Ljava/net/ProtocolException;-><init>(Ljava/lang/String;)V
throw p1
.line 231
:cond_1
:goto_0
:try_start_0
invoke-super {p0, p1, p2, p3}, Lokio/ForwardingSink;->write(Lokio/Buffer;J)V
iget-wide v0, p0, Lokhttp3/internal/connection/Exchange$RequestBodySink;->bytesReceived:J
add-long/2addr v0, p2
iput-wide v0, p0, Lokhttp3/internal/connection/Exchange$RequestBodySink;->bytesReceived:J
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
return-void
:catch_0
move-exception p1
.line 234
invoke-direct {p0, p1}, Lokhttp3/internal/connection/Exchange$RequestBodySink;->complete(Ljava/io/IOException;)Ljava/io/IOException;
move-result-object p1
throw p1
.line 225
:cond_2
new-instance p1, Ljava/lang/IllegalStateException;
const-string p2, "closed"
invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p1
.end method

View File

@@ -0,0 +1,242 @@
.class public final Lokhttp3/internal/connection/Exchange$ResponseBodySource;
.super Lokio/ForwardingSource;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lokhttp3/internal/connection/Exchange;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x11
name = "ResponseBodySource"
.end annotation
# instance fields
.field public bytesReceived:J
.field public closed:Z
.field public completed:Z
.field public final contentLength:J
.field public final synthetic this$0:Lokhttp3/internal/connection/Exchange;
# direct methods
.method public constructor <init>(Lokhttp3/internal/connection/Exchange;Lokio/Source;J)V
.locals 0
iput-object p1, p0, Lokhttp3/internal/connection/Exchange$ResponseBodySource;->this$0:Lokhttp3/internal/connection/Exchange;
.line 275
invoke-direct {p0, p2}, Lokio/ForwardingSource;-><init>(Lokio/Source;)V
iput-wide p3, p0, Lokhttp3/internal/connection/Exchange$ResponseBodySource;->contentLength:J
const-wide/16 p1, 0x0
cmp-long p1, p3, p1
if-nez p1, :cond_0
const/4 p1, 0x0
.line 279
invoke-virtual {p0, p1}, Lokhttp3/internal/connection/Exchange$ResponseBodySource;->complete(Ljava/io/IOException;)Ljava/io/IOException;
:cond_0
return-void
.end method
# virtual methods
.method public close()V
.locals 1
iget-boolean v0, p0, Lokhttp3/internal/connection/Exchange$ResponseBodySource;->closed:Z
if-eqz v0, :cond_0
return-void
:cond_0
const/4 v0, 0x1
iput-boolean v0, p0, Lokhttp3/internal/connection/Exchange$ResponseBodySource;->closed:Z
.line 313
:try_start_0
invoke-super {p0}, Lokio/ForwardingSource;->close()V
const/4 v0, 0x0
.line 314
invoke-virtual {p0, v0}, Lokhttp3/internal/connection/Exchange$ResponseBodySource;->complete(Ljava/io/IOException;)Ljava/io/IOException;
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
return-void
:catch_0
move-exception v0
.line 316
invoke-virtual {p0, v0}, Lokhttp3/internal/connection/Exchange$ResponseBodySource;->complete(Ljava/io/IOException;)Ljava/io/IOException;
move-result-object v0
throw v0
.end method
.method public complete(Ljava/io/IOException;)Ljava/io/IOException;
.locals 7
iget-boolean v0, p0, Lokhttp3/internal/connection/Exchange$ResponseBodySource;->completed:Z
if-eqz v0, :cond_0
return-object p1
:cond_0
const/4 v0, 0x1
iput-boolean v0, p0, Lokhttp3/internal/connection/Exchange$ResponseBodySource;->completed:Z
iget-object v1, p0, Lokhttp3/internal/connection/Exchange$ResponseBodySource;->this$0:Lokhttp3/internal/connection/Exchange;
iget-wide v2, p0, Lokhttp3/internal/connection/Exchange$ResponseBodySource;->bytesReceived:J
const/4 v4, 0x1
const/4 v5, 0x0
move-object v6, p1
.line 323
invoke-virtual/range {v1 .. v6}, Lokhttp3/internal/connection/Exchange;->bodyComplete(JZZLjava/io/IOException;)Ljava/io/IOException;
move-result-object p1
return-object p1
.end method
.method public read(Lokio/Buffer;J)J
.locals 7
iget-boolean v0, p0, Lokhttp3/internal/connection/Exchange$ResponseBodySource;->closed:Z
if-nez v0, :cond_4
.line 286
:try_start_0
invoke-virtual {p0}, Lokio/ForwardingSource;->delegate()Lokio/Source;
move-result-object v0
invoke-interface {v0, p1, p2, p3}, Lokio/Source;->read(Lokio/Buffer;J)J
move-result-wide p1
const-wide/16 v0, -0x1
cmp-long p3, p1, v0
const/4 v2, 0x0
if-nez p3, :cond_0
.line 288
invoke-virtual {p0, v2}, Lokhttp3/internal/connection/Exchange$ResponseBodySource;->complete(Ljava/io/IOException;)Ljava/io/IOException;
return-wide v0
:catch_0
move-exception p1
goto :goto_1
:cond_0
iget-wide v3, p0, Lokhttp3/internal/connection/Exchange$ResponseBodySource;->bytesReceived:J
add-long/2addr v3, p1
iget-wide v5, p0, Lokhttp3/internal/connection/Exchange$ResponseBodySource;->contentLength:J
cmp-long p3, v5, v0
if-eqz p3, :cond_2
cmp-long p3, v3, v5
if-gtz p3, :cond_1
goto :goto_0
.line 294
:cond_1
new-instance p1, Ljava/net/ProtocolException;
new-instance p2, Ljava/lang/StringBuilder;
invoke-direct {p2}, Ljava/lang/StringBuilder;-><init>()V
const-string p3, "expected "
invoke-virtual {p2, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-wide v0, p0, Lokhttp3/internal/connection/Exchange$ResponseBodySource;->contentLength:J
invoke-virtual {p2, v0, v1}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
const-string p3, " bytes but received "
invoke-virtual {p2, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p2, v3, v4}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p2
invoke-direct {p1, p2}, Ljava/net/ProtocolException;-><init>(Ljava/lang/String;)V
throw p1
:cond_2
:goto_0
iput-wide v3, p0, Lokhttp3/internal/connection/Exchange$ResponseBodySource;->bytesReceived:J
cmp-long p3, v3, v5
if-nez p3, :cond_3
.line 300
invoke-virtual {p0, v2}, Lokhttp3/internal/connection/Exchange$ResponseBodySource;->complete(Ljava/io/IOException;)Ljava/io/IOException;
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
:cond_3
return-wide p1
.line 305
:goto_1
invoke-virtual {p0, p1}, Lokhttp3/internal/connection/Exchange$ResponseBodySource;->complete(Ljava/io/IOException;)Ljava/io/IOException;
move-result-object p1
throw p1
.line 284
:cond_4
new-instance p1, Ljava/lang/IllegalStateException;
const-string p2, "closed"
invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p1
.end method

View File

@@ -0,0 +1,497 @@
.class public final Lokhttp3/internal/connection/Exchange;
.super Ljava/lang/Object;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lokhttp3/internal/connection/Exchange$ResponseBodySource;,
Lokhttp3/internal/connection/Exchange$RequestBodySink;
}
.end annotation
# instance fields
.field public final call:Lokhttp3/Call;
.field public final codec:Lokhttp3/internal/http/ExchangeCodec;
.field public duplex:Z
.field public final eventListener:Lokhttp3/EventListener;
.field public final finder:Lokhttp3/internal/connection/ExchangeFinder;
.field public final transmitter:Lokhttp3/internal/connection/Transmitter;
# direct methods
.method public constructor <init>(Lokhttp3/internal/connection/Transmitter;Lokhttp3/Call;Lokhttp3/EventListener;Lokhttp3/internal/connection/ExchangeFinder;Lokhttp3/internal/http/ExchangeCodec;)V
.locals 0
.line 52
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Lokhttp3/internal/connection/Exchange;->transmitter:Lokhttp3/internal/connection/Transmitter;
iput-object p2, p0, Lokhttp3/internal/connection/Exchange;->call:Lokhttp3/Call;
iput-object p3, p0, Lokhttp3/internal/connection/Exchange;->eventListener:Lokhttp3/EventListener;
iput-object p4, p0, Lokhttp3/internal/connection/Exchange;->finder:Lokhttp3/internal/connection/ExchangeFinder;
iput-object p5, p0, Lokhttp3/internal/connection/Exchange;->codec:Lokhttp3/internal/http/ExchangeCodec;
return-void
.end method
# virtual methods
.method public bodyComplete(JZZLjava/io/IOException;)Ljava/io/IOException;
.locals 2
if-eqz p5, :cond_0
.line 188
invoke-virtual {p0, p5}, Lokhttp3/internal/connection/Exchange;->trackFailure(Ljava/io/IOException;)V
:cond_0
if-eqz p4, :cond_2
if-eqz p5, :cond_1
iget-object v0, p0, Lokhttp3/internal/connection/Exchange;->eventListener:Lokhttp3/EventListener;
iget-object v1, p0, Lokhttp3/internal/connection/Exchange;->call:Lokhttp3/Call;
.line 192
invoke-virtual {v0, v1, p5}, Lokhttp3/EventListener;->requestFailed(Lokhttp3/Call;Ljava/io/IOException;)V
goto :goto_0
:cond_1
iget-object v0, p0, Lokhttp3/internal/connection/Exchange;->eventListener:Lokhttp3/EventListener;
iget-object v1, p0, Lokhttp3/internal/connection/Exchange;->call:Lokhttp3/Call;
.line 194
invoke-virtual {v0, v1, p1, p2}, Lokhttp3/EventListener;->requestBodyEnd(Lokhttp3/Call;J)V
:cond_2
:goto_0
if-eqz p3, :cond_4
if-eqz p5, :cond_3
iget-object p1, p0, Lokhttp3/internal/connection/Exchange;->eventListener:Lokhttp3/EventListener;
iget-object p2, p0, Lokhttp3/internal/connection/Exchange;->call:Lokhttp3/Call;
.line 199
invoke-virtual {p1, p2, p5}, Lokhttp3/EventListener;->responseFailed(Lokhttp3/Call;Ljava/io/IOException;)V
goto :goto_1
:cond_3
iget-object v0, p0, Lokhttp3/internal/connection/Exchange;->eventListener:Lokhttp3/EventListener;
iget-object v1, p0, Lokhttp3/internal/connection/Exchange;->call:Lokhttp3/Call;
.line 201
invoke-virtual {v0, v1, p1, p2}, Lokhttp3/EventListener;->responseBodyEnd(Lokhttp3/Call;J)V
:cond_4
:goto_1
iget-object p1, p0, Lokhttp3/internal/connection/Exchange;->transmitter:Lokhttp3/internal/connection/Transmitter;
.line 204
invoke-virtual {p1, p0, p4, p3, p5}, Lokhttp3/internal/connection/Transmitter;->exchangeMessageDone(Lokhttp3/internal/connection/Exchange;ZZLjava/io/IOException;)Ljava/io/IOException;
move-result-object p1
return-object p1
.end method
.method public cancel()V
.locals 1
iget-object v0, p0, Lokhttp3/internal/connection/Exchange;->codec:Lokhttp3/internal/http/ExchangeCodec;
.line 168
invoke-interface {v0}, Lokhttp3/internal/http/ExchangeCodec;->cancel()V
return-void
.end method
.method public connection()Lokhttp3/internal/connection/RealConnection;
.locals 1
iget-object v0, p0, Lokhttp3/internal/connection/Exchange;->codec:Lokhttp3/internal/http/ExchangeCodec;
.line 61
invoke-interface {v0}, Lokhttp3/internal/http/ExchangeCodec;->connection()Lokhttp3/internal/connection/RealConnection;
move-result-object v0
return-object v0
.end method
.method public createRequestBody(Lokhttp3/Request;Z)Lokio/Sink;
.locals 3
iput-boolean p2, p0, Lokhttp3/internal/connection/Exchange;->duplex:Z
.line 83
invoke-virtual {p1}, Lokhttp3/Request;->body()Lokhttp3/RequestBody;
move-result-object p2
invoke-virtual {p2}, Lokhttp3/RequestBody;->contentLength()J
move-result-wide v0
iget-object p2, p0, Lokhttp3/internal/connection/Exchange;->eventListener:Lokhttp3/EventListener;
iget-object v2, p0, Lokhttp3/internal/connection/Exchange;->call:Lokhttp3/Call;
.line 84
invoke-virtual {p2, v2}, Lokhttp3/EventListener;->requestBodyStart(Lokhttp3/Call;)V
iget-object p2, p0, Lokhttp3/internal/connection/Exchange;->codec:Lokhttp3/internal/http/ExchangeCodec;
.line 85
invoke-interface {p2, p1, v0, v1}, Lokhttp3/internal/http/ExchangeCodec;->createRequestBody(Lokhttp3/Request;J)Lokio/Sink;
move-result-object p1
.line 86
new-instance p2, Lokhttp3/internal/connection/Exchange$RequestBodySink;
invoke-direct {p2, p0, p1, v0, v1}, Lokhttp3/internal/connection/Exchange$RequestBodySink;-><init>(Lokhttp3/internal/connection/Exchange;Lokio/Sink;J)V
return-object p2
.end method
.method public detachWithViolence()V
.locals 3
iget-object v0, p0, Lokhttp3/internal/connection/Exchange;->codec:Lokhttp3/internal/http/ExchangeCodec;
.line 176
invoke-interface {v0}, Lokhttp3/internal/http/ExchangeCodec;->cancel()V
iget-object v0, p0, Lokhttp3/internal/connection/Exchange;->transmitter:Lokhttp3/internal/connection/Transmitter;
const/4 v1, 0x1
const/4 v2, 0x0
.line 177
invoke-virtual {v0, p0, v1, v1, v2}, Lokhttp3/internal/connection/Transmitter;->exchangeMessageDone(Lokhttp3/internal/connection/Exchange;ZZLjava/io/IOException;)Ljava/io/IOException;
return-void
.end method
.method public finishRequest()V
.locals 3
:try_start_0
iget-object v0, p0, Lokhttp3/internal/connection/Exchange;->codec:Lokhttp3/internal/http/ExchangeCodec;
.line 101
invoke-interface {v0}, Lokhttp3/internal/http/ExchangeCodec;->finishRequest()V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
return-void
:catch_0
move-exception v0
iget-object v1, p0, Lokhttp3/internal/connection/Exchange;->eventListener:Lokhttp3/EventListener;
iget-object v2, p0, Lokhttp3/internal/connection/Exchange;->call:Lokhttp3/Call;
.line 103
invoke-virtual {v1, v2, v0}, Lokhttp3/EventListener;->requestFailed(Lokhttp3/Call;Ljava/io/IOException;)V
.line 104
invoke-virtual {p0, v0}, Lokhttp3/internal/connection/Exchange;->trackFailure(Ljava/io/IOException;)V
.line 105
throw v0
.end method
.method public flushRequest()V
.locals 3
:try_start_0
iget-object v0, p0, Lokhttp3/internal/connection/Exchange;->codec:Lokhttp3/internal/http/ExchangeCodec;
.line 91
invoke-interface {v0}, Lokhttp3/internal/http/ExchangeCodec;->flushRequest()V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
return-void
:catch_0
move-exception v0
iget-object v1, p0, Lokhttp3/internal/connection/Exchange;->eventListener:Lokhttp3/EventListener;
iget-object v2, p0, Lokhttp3/internal/connection/Exchange;->call:Lokhttp3/Call;
.line 93
invoke-virtual {v1, v2, v0}, Lokhttp3/EventListener;->requestFailed(Lokhttp3/Call;Ljava/io/IOException;)V
.line 94
invoke-virtual {p0, v0}, Lokhttp3/internal/connection/Exchange;->trackFailure(Ljava/io/IOException;)V
.line 95
throw v0
.end method
.method public isDuplex()Z
.locals 1
iget-boolean v0, p0, Lokhttp3/internal/connection/Exchange;->duplex:Z
return v0
.end method
.method public noNewExchangesOnConnection()V
.locals 1
iget-object v0, p0, Lokhttp3/internal/connection/Exchange;->codec:Lokhttp3/internal/http/ExchangeCodec;
.line 164
invoke-interface {v0}, Lokhttp3/internal/http/ExchangeCodec;->connection()Lokhttp3/internal/connection/RealConnection;
move-result-object v0
invoke-virtual {v0}, Lokhttp3/internal/connection/RealConnection;->noNewExchanges()V
return-void
.end method
.method public noRequestBody()V
.locals 4
iget-object v0, p0, Lokhttp3/internal/connection/Exchange;->transmitter:Lokhttp3/internal/connection/Transmitter;
const/4 v1, 0x0
const/4 v2, 0x0
const/4 v3, 0x1
.line 208
invoke-virtual {v0, p0, v3, v1, v2}, Lokhttp3/internal/connection/Transmitter;->exchangeMessageDone(Lokhttp3/internal/connection/Exchange;ZZLjava/io/IOException;)Ljava/io/IOException;
return-void
.end method
.method public openResponseBody(Lokhttp3/Response;)Lokhttp3/ResponseBody;
.locals 4
:try_start_0
iget-object v0, p0, Lokhttp3/internal/connection/Exchange;->eventListener:Lokhttp3/EventListener;
iget-object v1, p0, Lokhttp3/internal/connection/Exchange;->call:Lokhttp3/Call;
.line 133
invoke-virtual {v0, v1}, Lokhttp3/EventListener;->responseBodyStart(Lokhttp3/Call;)V
const-string v0, "Content-Type"
.line 134
invoke-virtual {p1, v0}, Lokhttp3/Response;->header(Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
iget-object v1, p0, Lokhttp3/internal/connection/Exchange;->codec:Lokhttp3/internal/http/ExchangeCodec;
.line 135
invoke-interface {v1, p1}, Lokhttp3/internal/http/ExchangeCodec;->reportedContentLength(Lokhttp3/Response;)J
move-result-wide v1
iget-object v3, p0, Lokhttp3/internal/connection/Exchange;->codec:Lokhttp3/internal/http/ExchangeCodec;
.line 136
invoke-interface {v3, p1}, Lokhttp3/internal/http/ExchangeCodec;->openResponseBodySource(Lokhttp3/Response;)Lokio/Source;
move-result-object p1
.line 137
new-instance v3, Lokhttp3/internal/connection/Exchange$ResponseBodySource;
invoke-direct {v3, p0, p1, v1, v2}, Lokhttp3/internal/connection/Exchange$ResponseBodySource;-><init>(Lokhttp3/internal/connection/Exchange;Lokio/Source;J)V
.line 138
new-instance p1, Lokhttp3/internal/http/RealResponseBody;
invoke-static {v3}, Lokio/Okio;->buffer(Lokio/Source;)Lokio/BufferedSource;
move-result-object v3
invoke-direct {p1, v0, v1, v2, v3}, Lokhttp3/internal/http/RealResponseBody;-><init>(Ljava/lang/String;JLokio/BufferedSource;)V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
return-object p1
:catch_0
move-exception p1
iget-object v0, p0, Lokhttp3/internal/connection/Exchange;->eventListener:Lokhttp3/EventListener;
iget-object v1, p0, Lokhttp3/internal/connection/Exchange;->call:Lokhttp3/Call;
.line 140
invoke-virtual {v0, v1, p1}, Lokhttp3/EventListener;->responseFailed(Lokhttp3/Call;Ljava/io/IOException;)V
.line 141
invoke-virtual {p0, p1}, Lokhttp3/internal/connection/Exchange;->trackFailure(Ljava/io/IOException;)V
.line 142
throw p1
.end method
.method public readResponseHeaders(Z)Lokhttp3/Response$Builder;
.locals 2
:try_start_0
iget-object v0, p0, Lokhttp3/internal/connection/Exchange;->codec:Lokhttp3/internal/http/ExchangeCodec;
.line 115
invoke-interface {v0, p1}, Lokhttp3/internal/http/ExchangeCodec;->readResponseHeaders(Z)Lokhttp3/Response$Builder;
move-result-object p1
if-eqz p1, :cond_0
sget-object v0, Lokhttp3/internal/Internal;->instance:Lokhttp3/internal/Internal;
.line 117
invoke-virtual {v0, p1, p0}, Lokhttp3/internal/Internal;->initExchange(Lokhttp3/Response$Builder;Lokhttp3/internal/connection/Exchange;)V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
goto :goto_0
:catch_0
move-exception p1
goto :goto_1
:cond_0
:goto_0
return-object p1
:goto_1
iget-object v0, p0, Lokhttp3/internal/connection/Exchange;->eventListener:Lokhttp3/EventListener;
iget-object v1, p0, Lokhttp3/internal/connection/Exchange;->call:Lokhttp3/Call;
.line 121
invoke-virtual {v0, v1, p1}, Lokhttp3/EventListener;->responseFailed(Lokhttp3/Call;Ljava/io/IOException;)V
.line 122
invoke-virtual {p0, p1}, Lokhttp3/internal/connection/Exchange;->trackFailure(Ljava/io/IOException;)V
.line 123
throw p1
.end method
.method public responseHeadersEnd(Lokhttp3/Response;)V
.locals 2
iget-object v0, p0, Lokhttp3/internal/connection/Exchange;->eventListener:Lokhttp3/EventListener;
iget-object v1, p0, Lokhttp3/internal/connection/Exchange;->call:Lokhttp3/Call;
.line 128
invoke-virtual {v0, v1, p1}, Lokhttp3/EventListener;->responseHeadersEnd(Lokhttp3/Call;Lokhttp3/Response;)V
return-void
.end method
.method public responseHeadersStart()V
.locals 2
iget-object v0, p0, Lokhttp3/internal/connection/Exchange;->eventListener:Lokhttp3/EventListener;
iget-object v1, p0, Lokhttp3/internal/connection/Exchange;->call:Lokhttp3/Call;
.line 110
invoke-virtual {v0, v1}, Lokhttp3/EventListener;->responseHeadersStart(Lokhttp3/Call;)V
return-void
.end method
.method public trackFailure(Ljava/io/IOException;)V
.locals 1
iget-object v0, p0, Lokhttp3/internal/connection/Exchange;->finder:Lokhttp3/internal/connection/ExchangeFinder;
.line 181
invoke-virtual {v0}, Lokhttp3/internal/connection/ExchangeFinder;->trackFailure()V
iget-object v0, p0, Lokhttp3/internal/connection/Exchange;->codec:Lokhttp3/internal/http/ExchangeCodec;
.line 182
invoke-interface {v0}, Lokhttp3/internal/http/ExchangeCodec;->connection()Lokhttp3/internal/connection/RealConnection;
move-result-object v0
invoke-virtual {v0, p1}, Lokhttp3/internal/connection/RealConnection;->trackFailure(Ljava/io/IOException;)V
return-void
.end method
.method public writeRequestHeaders(Lokhttp3/Request;)V
.locals 2
:try_start_0
iget-object v0, p0, Lokhttp3/internal/connection/Exchange;->eventListener:Lokhttp3/EventListener;
iget-object v1, p0, Lokhttp3/internal/connection/Exchange;->call:Lokhttp3/Call;
.line 71
invoke-virtual {v0, v1}, Lokhttp3/EventListener;->requestHeadersStart(Lokhttp3/Call;)V
iget-object v0, p0, Lokhttp3/internal/connection/Exchange;->codec:Lokhttp3/internal/http/ExchangeCodec;
.line 72
invoke-interface {v0, p1}, Lokhttp3/internal/http/ExchangeCodec;->writeRequestHeaders(Lokhttp3/Request;)V
iget-object v0, p0, Lokhttp3/internal/connection/Exchange;->eventListener:Lokhttp3/EventListener;
iget-object v1, p0, Lokhttp3/internal/connection/Exchange;->call:Lokhttp3/Call;
.line 73
invoke-virtual {v0, v1, p1}, Lokhttp3/EventListener;->requestHeadersEnd(Lokhttp3/Call;Lokhttp3/Request;)V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
return-void
:catch_0
move-exception p1
iget-object v0, p0, Lokhttp3/internal/connection/Exchange;->eventListener:Lokhttp3/EventListener;
iget-object v1, p0, Lokhttp3/internal/connection/Exchange;->call:Lokhttp3/Call;
.line 75
invoke-virtual {v0, v1, p1}, Lokhttp3/EventListener;->requestFailed(Lokhttp3/Call;Ljava/io/IOException;)V
.line 76
invoke-virtual {p0, p1}, Lokhttp3/internal/connection/Exchange;->trackFailure(Ljava/io/IOException;)V
.line 77
throw p1
.end method

View File

@@ -0,0 +1,856 @@
.class public final Lokhttp3/internal/connection/ExchangeFinder;
.super Ljava/lang/Object;
.source "SourceFile"
# instance fields
.field public final address:Lokhttp3/Address;
.field public final call:Lokhttp3/Call;
.field public connectingConnection:Lokhttp3/internal/connection/RealConnection;
.field public final connectionPool:Lokhttp3/internal/connection/RealConnectionPool;
.field public final eventListener:Lokhttp3/EventListener;
.field public hasStreamFailure:Z
.field public nextRouteToTry:Lokhttp3/Route;
.field public routeSelection:Lokhttp3/internal/connection/RouteSelector$Selection;
.field public final routeSelector:Lokhttp3/internal/connection/RouteSelector;
.field public final transmitter:Lokhttp3/internal/connection/Transmitter;
# direct methods
.method static constructor <clinit>()V
.locals 0
return-void
.end method
.method public constructor <init>(Lokhttp3/internal/connection/Transmitter;Lokhttp3/internal/connection/RealConnectionPool;Lokhttp3/Address;Lokhttp3/Call;Lokhttp3/EventListener;)V
.locals 0
.line 69
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Lokhttp3/internal/connection/ExchangeFinder;->transmitter:Lokhttp3/internal/connection/Transmitter;
iput-object p2, p0, Lokhttp3/internal/connection/ExchangeFinder;->connectionPool:Lokhttp3/internal/connection/RealConnectionPool;
iput-object p3, p0, Lokhttp3/internal/connection/ExchangeFinder;->address:Lokhttp3/Address;
iput-object p4, p0, Lokhttp3/internal/connection/ExchangeFinder;->call:Lokhttp3/Call;
iput-object p5, p0, Lokhttp3/internal/connection/ExchangeFinder;->eventListener:Lokhttp3/EventListener;
.line 75
new-instance p1, Lokhttp3/internal/connection/RouteSelector;
iget-object p2, p2, Lokhttp3/internal/connection/RealConnectionPool;->routeDatabase:Lokhttp3/internal/connection/RouteDatabase;
invoke-direct {p1, p3, p2, p4, p5}, Lokhttp3/internal/connection/RouteSelector;-><init>(Lokhttp3/Address;Lokhttp3/internal/connection/RouteDatabase;Lokhttp3/Call;Lokhttp3/EventListener;)V
iput-object p1, p0, Lokhttp3/internal/connection/ExchangeFinder;->routeSelector:Lokhttp3/internal/connection/RouteSelector;
return-void
.end method
# virtual methods
.method public connectingConnection()Lokhttp3/internal/connection/RealConnection;
.locals 1
iget-object v0, p0, Lokhttp3/internal/connection/ExchangeFinder;->connectingConnection:Lokhttp3/internal/connection/RealConnection;
return-object v0
.end method
.method public find(Lokhttp3/OkHttpClient;Lokhttp3/Interceptor$Chain;Z)Lokhttp3/internal/http/ExchangeCodec;
.locals 7
.line 81
invoke-interface {p2}, Lokhttp3/Interceptor$Chain;->connectTimeoutMillis()I
move-result v1
.line 82
invoke-interface {p2}, Lokhttp3/Interceptor$Chain;->readTimeoutMillis()I
move-result v2
.line 83
invoke-interface {p2}, Lokhttp3/Interceptor$Chain;->writeTimeoutMillis()I
move-result v3
.line 84
invoke-virtual {p1}, Lokhttp3/OkHttpClient;->pingIntervalMillis()I
move-result v4
.line 85
invoke-virtual {p1}, Lokhttp3/OkHttpClient;->retryOnConnectionFailure()Z
move-result v5
move-object v0, p0
move v6, p3
.line 88
:try_start_0
invoke-virtual/range {v0 .. v6}, Lokhttp3/internal/connection/ExchangeFinder;->findHealthyConnection(IIIIZZ)Lokhttp3/internal/connection/RealConnection;
move-result-object p3
.line 90
invoke-virtual {p3, p1, p2}, Lokhttp3/internal/connection/RealConnection;->newCodec(Lokhttp3/OkHttpClient;Lokhttp3/Interceptor$Chain;)Lokhttp3/internal/http/ExchangeCodec;
move-result-object p1
:try_end_0
.catch Lokhttp3/internal/connection/RouteException; {:try_start_0 .. :try_end_0} :catch_1
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
return-object p1
:catch_0
move-exception p1
goto :goto_0
:catch_1
move-exception p1
goto :goto_1
.line 95
:goto_0
invoke-virtual {p0}, Lokhttp3/internal/connection/ExchangeFinder;->trackFailure()V
.line 96
new-instance p2, Lokhttp3/internal/connection/RouteException;
invoke-direct {p2, p1}, Lokhttp3/internal/connection/RouteException;-><init>(Ljava/io/IOException;)V
throw p2
.line 92
:goto_1
invoke-virtual {p0}, Lokhttp3/internal/connection/ExchangeFinder;->trackFailure()V
.line 93
throw p1
.end method
.method public final findConnection(IIIIZ)Lokhttp3/internal/connection/RealConnection;
.locals 18
move-object/from16 v1, p0
iget-object v2, v1, Lokhttp3/internal/connection/ExchangeFinder;->connectionPool:Lokhttp3/internal/connection/RealConnectionPool;
.line 140
monitor-enter v2
:try_start_0
iget-object v0, v1, Lokhttp3/internal/connection/ExchangeFinder;->transmitter:Lokhttp3/internal/connection/Transmitter;
.line 141
invoke-virtual {v0}, Lokhttp3/internal/connection/Transmitter;->isCanceled()Z
move-result v0
if-nez v0, :cond_11
const/4 v0, 0x0
iput-boolean v0, v1, Lokhttp3/internal/connection/ExchangeFinder;->hasStreamFailure:Z
iget-object v3, v1, Lokhttp3/internal/connection/ExchangeFinder;->transmitter:Lokhttp3/internal/connection/Transmitter;
.line 146
iget-object v4, v3, Lokhttp3/internal/connection/Transmitter;->connection:Lokhttp3/internal/connection/RealConnection;
const/4 v5, 0x0
if-eqz v4, :cond_0
.line 147
iget-boolean v6, v4, Lokhttp3/internal/connection/RealConnection;->noNewExchanges:Z
if-eqz v6, :cond_0
.line 148
invoke-virtual {v3}, Lokhttp3/internal/connection/Transmitter;->releaseConnectionNoEvents()Ljava/net/Socket;
move-result-object v3
goto :goto_0
:catchall_0
move-exception v0
goto/16 :goto_9
:cond_0
move-object v3, v5
:goto_0
iget-object v6, v1, Lokhttp3/internal/connection/ExchangeFinder;->transmitter:Lokhttp3/internal/connection/Transmitter;
.line 151
iget-object v7, v6, Lokhttp3/internal/connection/Transmitter;->connection:Lokhttp3/internal/connection/RealConnection;
if-eqz v7, :cond_1
move-object v4, v5
goto :goto_1
:cond_1
move-object v7, v5
:goto_1
const/4 v8, 0x1
if-nez v7, :cond_4
iget-object v9, v1, Lokhttp3/internal/connection/ExchangeFinder;->connectionPool:Lokhttp3/internal/connection/RealConnectionPool;
iget-object v10, v1, Lokhttp3/internal/connection/ExchangeFinder;->address:Lokhttp3/Address;
.line 159
invoke-virtual {v9, v10, v6, v5, v0}, Lokhttp3/internal/connection/RealConnectionPool;->transmitterAcquirePooledConnection(Lokhttp3/Address;Lokhttp3/internal/connection/Transmitter;Ljava/util/List;Z)Z
move-result v6
if-eqz v6, :cond_2
iget-object v6, v1, Lokhttp3/internal/connection/ExchangeFinder;->transmitter:Lokhttp3/internal/connection/Transmitter;
.line 161
iget-object v7, v6, Lokhttp3/internal/connection/Transmitter;->connection:Lokhttp3/internal/connection/RealConnection;
move-object v6, v5
move v9, v8
goto :goto_3
:cond_2
iget-object v6, v1, Lokhttp3/internal/connection/ExchangeFinder;->nextRouteToTry:Lokhttp3/Route;
if-eqz v6, :cond_3
iput-object v5, v1, Lokhttp3/internal/connection/ExchangeFinder;->nextRouteToTry:Lokhttp3/Route;
:goto_2
move v9, v0
goto :goto_3
.line 165
:cond_3
invoke-virtual/range {p0 .. p0}, Lokhttp3/internal/connection/ExchangeFinder;->retryCurrentRoute()Z
move-result v6
if-eqz v6, :cond_4
iget-object v6, v1, Lokhttp3/internal/connection/ExchangeFinder;->transmitter:Lokhttp3/internal/connection/Transmitter;
.line 166
iget-object v6, v6, Lokhttp3/internal/connection/Transmitter;->connection:Lokhttp3/internal/connection/RealConnection;
invoke-virtual {v6}, Lokhttp3/internal/connection/RealConnection;->route()Lokhttp3/Route;
move-result-object v6
goto :goto_2
:cond_4
move v9, v0
move-object v6, v5
.line 169
:goto_3
monitor-exit v2
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 170
invoke-static {v3}, Lokhttp3/internal/Util;->closeQuietly(Ljava/net/Socket;)V
if-eqz v4, :cond_5
iget-object v2, v1, Lokhttp3/internal/connection/ExchangeFinder;->eventListener:Lokhttp3/EventListener;
iget-object v3, v1, Lokhttp3/internal/connection/ExchangeFinder;->call:Lokhttp3/Call;
.line 173
invoke-virtual {v2, v3, v4}, Lokhttp3/EventListener;->connectionReleased(Lokhttp3/Call;Lokhttp3/Connection;)V
:cond_5
if-eqz v9, :cond_6
iget-object v2, v1, Lokhttp3/internal/connection/ExchangeFinder;->eventListener:Lokhttp3/EventListener;
iget-object v3, v1, Lokhttp3/internal/connection/ExchangeFinder;->call:Lokhttp3/Call;
.line 176
invoke-virtual {v2, v3, v7}, Lokhttp3/EventListener;->connectionAcquired(Lokhttp3/Call;Lokhttp3/Connection;)V
:cond_6
if-eqz v7, :cond_7
return-object v7
:cond_7
if-nez v6, :cond_9
iget-object v2, v1, Lokhttp3/internal/connection/ExchangeFinder;->routeSelection:Lokhttp3/internal/connection/RouteSelector$Selection;
if-eqz v2, :cond_8
.line 185
invoke-virtual {v2}, Lokhttp3/internal/connection/RouteSelector$Selection;->hasNext()Z
move-result v2
if-nez v2, :cond_9
:cond_8
iget-object v2, v1, Lokhttp3/internal/connection/ExchangeFinder;->routeSelector:Lokhttp3/internal/connection/RouteSelector;
.line 187
invoke-virtual {v2}, Lokhttp3/internal/connection/RouteSelector;->next()Lokhttp3/internal/connection/RouteSelector$Selection;
move-result-object v2
iput-object v2, v1, Lokhttp3/internal/connection/ExchangeFinder;->routeSelection:Lokhttp3/internal/connection/RouteSelector$Selection;
move v2, v8
goto :goto_4
:cond_9
move v2, v0
:goto_4
iget-object v3, v1, Lokhttp3/internal/connection/ExchangeFinder;->connectionPool:Lokhttp3/internal/connection/RealConnectionPool;
.line 191
monitor-enter v3
:try_start_1
iget-object v4, v1, Lokhttp3/internal/connection/ExchangeFinder;->transmitter:Lokhttp3/internal/connection/Transmitter;
.line 192
invoke-virtual {v4}, Lokhttp3/internal/connection/Transmitter;->isCanceled()Z
move-result v4
if-nez v4, :cond_10
if-eqz v2, :cond_a
iget-object v2, v1, Lokhttp3/internal/connection/ExchangeFinder;->routeSelection:Lokhttp3/internal/connection/RouteSelector$Selection;
.line 197
invoke-virtual {v2}, Lokhttp3/internal/connection/RouteSelector$Selection;->getAll()Ljava/util/List;
move-result-object v2
iget-object v4, v1, Lokhttp3/internal/connection/ExchangeFinder;->connectionPool:Lokhttp3/internal/connection/RealConnectionPool;
iget-object v10, v1, Lokhttp3/internal/connection/ExchangeFinder;->address:Lokhttp3/Address;
iget-object v11, v1, Lokhttp3/internal/connection/ExchangeFinder;->transmitter:Lokhttp3/internal/connection/Transmitter;
.line 198
invoke-virtual {v4, v10, v11, v2, v0}, Lokhttp3/internal/connection/RealConnectionPool;->transmitterAcquirePooledConnection(Lokhttp3/Address;Lokhttp3/internal/connection/Transmitter;Ljava/util/List;Z)Z
move-result v0
if-eqz v0, :cond_b
iget-object v0, v1, Lokhttp3/internal/connection/ExchangeFinder;->transmitter:Lokhttp3/internal/connection/Transmitter;
.line 201
iget-object v7, v0, Lokhttp3/internal/connection/Transmitter;->connection:Lokhttp3/internal/connection/RealConnection;
move v9, v8
goto :goto_5
:catchall_1
move-exception v0
goto/16 :goto_8
:cond_a
move-object v2, v5
:cond_b
:goto_5
if-nez v9, :cond_d
if-nez v6, :cond_c
iget-object v0, v1, Lokhttp3/internal/connection/ExchangeFinder;->routeSelection:Lokhttp3/internal/connection/RouteSelector$Selection;
.line 207
invoke-virtual {v0}, Lokhttp3/internal/connection/RouteSelector$Selection;->next()Lokhttp3/Route;
move-result-object v6
.line 212
:cond_c
new-instance v7, Lokhttp3/internal/connection/RealConnection;
iget-object v0, v1, Lokhttp3/internal/connection/ExchangeFinder;->connectionPool:Lokhttp3/internal/connection/RealConnectionPool;
invoke-direct {v7, v0, v6}, Lokhttp3/internal/connection/RealConnection;-><init>(Lokhttp3/internal/connection/RealConnectionPool;Lokhttp3/Route;)V
iput-object v7, v1, Lokhttp3/internal/connection/ExchangeFinder;->connectingConnection:Lokhttp3/internal/connection/RealConnection;
.line 215
:cond_d
monitor-exit v3
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_1
if-eqz v9, :cond_e
iget-object v0, v1, Lokhttp3/internal/connection/ExchangeFinder;->eventListener:Lokhttp3/EventListener;
iget-object v2, v1, Lokhttp3/internal/connection/ExchangeFinder;->call:Lokhttp3/Call;
.line 219
invoke-virtual {v0, v2, v7}, Lokhttp3/EventListener;->connectionAcquired(Lokhttp3/Call;Lokhttp3/Connection;)V
return-object v7
:cond_e
iget-object v0, v1, Lokhttp3/internal/connection/ExchangeFinder;->call:Lokhttp3/Call;
iget-object v3, v1, Lokhttp3/internal/connection/ExchangeFinder;->eventListener:Lokhttp3/EventListener;
move-object v10, v7
move/from16 v11, p1
move/from16 v12, p2
move/from16 v13, p3
move/from16 v14, p4
move/from16 v15, p5
move-object/from16 v16, v0
move-object/from16 v17, v3
.line 224
invoke-virtual/range {v10 .. v17}, Lokhttp3/internal/connection/RealConnection;->connect(IIIIZLokhttp3/Call;Lokhttp3/EventListener;)V
iget-object v0, v1, Lokhttp3/internal/connection/ExchangeFinder;->connectionPool:Lokhttp3/internal/connection/RealConnectionPool;
.line 226
iget-object v0, v0, Lokhttp3/internal/connection/RealConnectionPool;->routeDatabase:Lokhttp3/internal/connection/RouteDatabase;
invoke-virtual {v7}, Lokhttp3/internal/connection/RealConnection;->route()Lokhttp3/Route;
move-result-object v3
invoke-virtual {v0, v3}, Lokhttp3/internal/connection/RouteDatabase;->connected(Lokhttp3/Route;)V
iget-object v4, v1, Lokhttp3/internal/connection/ExchangeFinder;->connectionPool:Lokhttp3/internal/connection/RealConnectionPool;
.line 229
monitor-enter v4
:try_start_2
iput-object v5, v1, Lokhttp3/internal/connection/ExchangeFinder;->connectingConnection:Lokhttp3/internal/connection/RealConnection;
iget-object v0, v1, Lokhttp3/internal/connection/ExchangeFinder;->connectionPool:Lokhttp3/internal/connection/RealConnectionPool;
iget-object v3, v1, Lokhttp3/internal/connection/ExchangeFinder;->address:Lokhttp3/Address;
iget-object v9, v1, Lokhttp3/internal/connection/ExchangeFinder;->transmitter:Lokhttp3/internal/connection/Transmitter;
.line 233
invoke-virtual {v0, v3, v9, v2, v8}, Lokhttp3/internal/connection/RealConnectionPool;->transmitterAcquirePooledConnection(Lokhttp3/Address;Lokhttp3/internal/connection/Transmitter;Ljava/util/List;Z)Z
move-result v0
if-eqz v0, :cond_f
.line 235
iput-boolean v8, v7, Lokhttp3/internal/connection/RealConnection;->noNewExchanges:Z
.line 236
invoke-virtual {v7}, Lokhttp3/internal/connection/RealConnection;->socket()Ljava/net/Socket;
move-result-object v5
iget-object v0, v1, Lokhttp3/internal/connection/ExchangeFinder;->transmitter:Lokhttp3/internal/connection/Transmitter;
.line 237
iget-object v7, v0, Lokhttp3/internal/connection/Transmitter;->connection:Lokhttp3/internal/connection/RealConnection;
iput-object v6, v1, Lokhttp3/internal/connection/ExchangeFinder;->nextRouteToTry:Lokhttp3/Route;
goto :goto_6
:catchall_2
move-exception v0
goto :goto_7
:cond_f
iget-object v0, v1, Lokhttp3/internal/connection/ExchangeFinder;->connectionPool:Lokhttp3/internal/connection/RealConnectionPool;
.line 243
invoke-virtual {v0, v7}, Lokhttp3/internal/connection/RealConnectionPool;->put(Lokhttp3/internal/connection/RealConnection;)V
iget-object v0, v1, Lokhttp3/internal/connection/ExchangeFinder;->transmitter:Lokhttp3/internal/connection/Transmitter;
.line 244
invoke-virtual {v0, v7}, Lokhttp3/internal/connection/Transmitter;->acquireConnectionNoEvents(Lokhttp3/internal/connection/RealConnection;)V
.line 246
:goto_6
monitor-exit v4
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_2
.line 247
invoke-static {v5}, Lokhttp3/internal/Util;->closeQuietly(Ljava/net/Socket;)V
iget-object v0, v1, Lokhttp3/internal/connection/ExchangeFinder;->eventListener:Lokhttp3/EventListener;
iget-object v2, v1, Lokhttp3/internal/connection/ExchangeFinder;->call:Lokhttp3/Call;
.line 249
invoke-virtual {v0, v2, v7}, Lokhttp3/EventListener;->connectionAcquired(Lokhttp3/Call;Lokhttp3/Connection;)V
return-object v7
.line 246
:goto_7
:try_start_3
monitor-exit v4
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_2
throw v0
.line 192
:cond_10
:try_start_4
new-instance v0, Ljava/io/IOException;
const-string v2, "Canceled"
invoke-direct {v0, v2}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
throw v0
.line 215
:goto_8
monitor-exit v3
:try_end_4
.catchall {:try_start_4 .. :try_end_4} :catchall_1
throw v0
.line 141
:cond_11
:try_start_5
new-instance v0, Ljava/io/IOException;
const-string v3, "Canceled"
invoke-direct {v0, v3}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
throw v0
.line 169
:goto_9
monitor-exit v2
:try_end_5
.catchall {:try_start_5 .. :try_end_5} :catchall_0
throw v0
.end method
.method public final findHealthyConnection(IIIIZZ)Lokhttp3/internal/connection/RealConnection;
.locals 3
.line 108
:goto_0
invoke-virtual/range {p0 .. p5}, Lokhttp3/internal/connection/ExchangeFinder;->findConnection(IIIIZ)Lokhttp3/internal/connection/RealConnection;
move-result-object v0
iget-object v1, p0, Lokhttp3/internal/connection/ExchangeFinder;->connectionPool:Lokhttp3/internal/connection/RealConnectionPool;
.line 112
monitor-enter v1
.line 113
:try_start_0
iget v2, v0, Lokhttp3/internal/connection/RealConnection;->successCount:I
if-nez v2, :cond_0
invoke-virtual {v0}, Lokhttp3/internal/connection/RealConnection;->isMultiplexed()Z
move-result v2
if-nez v2, :cond_0
.line 114
monitor-exit v1
return-object v0
:catchall_0
move-exception p1
goto :goto_1
.line 116
:cond_0
monitor-exit v1
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 120
invoke-virtual {v0, p6}, Lokhttp3/internal/connection/RealConnection;->isHealthy(Z)Z
move-result v1
if-nez v1, :cond_1
.line 121
invoke-virtual {v0}, Lokhttp3/internal/connection/RealConnection;->noNewExchanges()V
goto :goto_0
:cond_1
return-object v0
.line 116
:goto_1
:try_start_1
monitor-exit v1
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
throw p1
.end method
.method public hasRouteToTry()Z
.locals 3
iget-object v0, p0, Lokhttp3/internal/connection/ExchangeFinder;->connectionPool:Lokhttp3/internal/connection/RealConnectionPool;
.line 274
monitor-enter v0
:try_start_0
iget-object v1, p0, Lokhttp3/internal/connection/ExchangeFinder;->nextRouteToTry:Lokhttp3/Route;
const/4 v2, 0x1
if-eqz v1, :cond_0
.line 276
monitor-exit v0
return v2
:catchall_0
move-exception v1
goto :goto_1
.line 278
:cond_0
invoke-virtual {p0}, Lokhttp3/internal/connection/ExchangeFinder;->retryCurrentRoute()Z
move-result v1
if-eqz v1, :cond_1
iget-object v1, p0, Lokhttp3/internal/connection/ExchangeFinder;->transmitter:Lokhttp3/internal/connection/Transmitter;
.line 280
iget-object v1, v1, Lokhttp3/internal/connection/Transmitter;->connection:Lokhttp3/internal/connection/RealConnection;
invoke-virtual {v1}, Lokhttp3/internal/connection/RealConnection;->route()Lokhttp3/Route;
move-result-object v1
iput-object v1, p0, Lokhttp3/internal/connection/ExchangeFinder;->nextRouteToTry:Lokhttp3/Route;
.line 281
monitor-exit v0
return v2
:cond_1
iget-object v1, p0, Lokhttp3/internal/connection/ExchangeFinder;->routeSelection:Lokhttp3/internal/connection/RouteSelector$Selection;
if-eqz v1, :cond_2
.line 283
invoke-virtual {v1}, Lokhttp3/internal/connection/RouteSelector$Selection;->hasNext()Z
move-result v1
if-nez v1, :cond_4
:cond_2
iget-object v1, p0, Lokhttp3/internal/connection/ExchangeFinder;->routeSelector:Lokhttp3/internal/connection/RouteSelector;
.line 284
invoke-virtual {v1}, Lokhttp3/internal/connection/RouteSelector;->hasNext()Z
move-result v1
if-eqz v1, :cond_3
goto :goto_0
:cond_3
const/4 v2, 0x0
:cond_4
:goto_0
monitor-exit v0
return v2
.line 285
:goto_1
monitor-exit v0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
throw v1
.end method
.method public hasStreamFailure()Z
.locals 2
iget-object v0, p0, Lokhttp3/internal/connection/ExchangeFinder;->connectionPool:Lokhttp3/internal/connection/RealConnectionPool;
.line 267
monitor-enter v0
:try_start_0
iget-boolean v1, p0, Lokhttp3/internal/connection/ExchangeFinder;->hasStreamFailure:Z
.line 268
monitor-exit v0
return v1
:catchall_0
move-exception v1
.line 269
monitor-exit v0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
throw v1
.end method
.method public final retryCurrentRoute()Z
.locals 2
iget-object v0, p0, Lokhttp3/internal/connection/ExchangeFinder;->transmitter:Lokhttp3/internal/connection/Transmitter;
.line 294
iget-object v0, v0, Lokhttp3/internal/connection/Transmitter;->connection:Lokhttp3/internal/connection/RealConnection;
if-eqz v0, :cond_0
iget v1, v0, Lokhttp3/internal/connection/RealConnection;->routeFailureCount:I
if-nez v1, :cond_0
.line 296
invoke-virtual {v0}, Lokhttp3/internal/connection/RealConnection;->route()Lokhttp3/Route;
move-result-object v0
invoke-virtual {v0}, Lokhttp3/Route;->address()Lokhttp3/Address;
move-result-object v0
invoke-virtual {v0}, Lokhttp3/Address;->url()Lokhttp3/HttpUrl;
move-result-object v0
iget-object v1, p0, Lokhttp3/internal/connection/ExchangeFinder;->address:Lokhttp3/Address;
invoke-virtual {v1}, Lokhttp3/Address;->url()Lokhttp3/HttpUrl;
move-result-object v1
invoke-static {v0, v1}, Lokhttp3/internal/Util;->sameConnection(Lokhttp3/HttpUrl;Lokhttp3/HttpUrl;)Z
move-result v0
if-eqz v0, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
return v0
.end method
.method public trackFailure()V
.locals 2
iget-object v0, p0, Lokhttp3/internal/connection/ExchangeFinder;->connectionPool:Lokhttp3/internal/connection/RealConnectionPool;
.line 260
monitor-enter v0
const/4 v1, 0x1
:try_start_0
iput-boolean v1, p0, Lokhttp3/internal/connection/ExchangeFinder;->hasStreamFailure:Z
.line 262
monitor-exit v0
return-void
:catchall_0
move-exception v1
monitor-exit v0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
throw v1
.end method

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,36 @@
.class public final synthetic Lokhttp3/internal/connection/RealConnectionPool$$ExternalSyntheticLambda0;
.super Ljava/lang/Object;
.source "SourceFile"
# interfaces
.implements Ljava/lang/Runnable;
# instance fields
.field public final synthetic f$0:Lokhttp3/internal/connection/RealConnectionPool;
# direct methods
.method public synthetic constructor <init>(Lokhttp3/internal/connection/RealConnectionPool;)V
.locals 0
.line 0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Lokhttp3/internal/connection/RealConnectionPool$$ExternalSyntheticLambda0;->f$0:Lokhttp3/internal/connection/RealConnectionPool;
return-void
.end method
# virtual methods
.method public final run()V
.locals 1
.line 0
iget-object v0, p0, Lokhttp3/internal/connection/RealConnectionPool$$ExternalSyntheticLambda0;->f$0:Lokhttp3/internal/connection/RealConnectionPool;
invoke-static {v0}, Lokhttp3/internal/connection/RealConnectionPool;->$r8$lambda$IlX_zHTDM1o4DMNAF0yuZyL86PI(Lokhttp3/internal/connection/RealConnectionPool;)V
return-void
.end method

View File

@@ -0,0 +1,645 @@
.class public final Lokhttp3/internal/connection/RealConnectionPool;
.super Ljava/lang/Object;
.source "SourceFile"
# static fields
.field public static final executor:Ljava/util/concurrent/Executor;
# instance fields
.field public final cleanupRunnable:Ljava/lang/Runnable;
.field public cleanupRunning:Z
.field public final connections:Ljava/util/Deque;
.field public final keepAliveDurationNs:J
.field public final maxIdleConnections:I
.field public final routeDatabase:Lokhttp3/internal/connection/RouteDatabase;
# direct methods
.method public static synthetic $r8$lambda$IlX_zHTDM1o4DMNAF0yuZyL86PI(Lokhttp3/internal/connection/RealConnectionPool;)V
.locals 0
.line 0
invoke-virtual {p0}, Lokhttp3/internal/connection/RealConnectionPool;->lambda$new$0()V
return-void
.end method
.method static constructor <clinit>()V
.locals 9
.line 46
new-instance v8, Ljava/util/concurrent/ThreadPoolExecutor;
const/4 v1, 0x0
const v2, 0x7fffffff
const-wide/16 v3, 0x3c
sget-object v5, Ljava/util/concurrent/TimeUnit;->SECONDS:Ljava/util/concurrent/TimeUnit;
new-instance v6, Ljava/util/concurrent/SynchronousQueue;
invoke-direct {v6}, Ljava/util/concurrent/SynchronousQueue;-><init>()V
const-string v0, "OkHttp ConnectionPool"
const/4 v7, 0x1
.line 48
invoke-static {v0, v7}, Lokhttp3/internal/Util;->threadFactory(Ljava/lang/String;Z)Ljava/util/concurrent/ThreadFactory;
move-result-object v7
move-object v0, v8
invoke-direct/range {v0 .. v7}, Ljava/util/concurrent/ThreadPoolExecutor;-><init>(IIJLjava/util/concurrent/TimeUnit;Ljava/util/concurrent/BlockingQueue;Ljava/util/concurrent/ThreadFactory;)V
sput-object v8, Lokhttp3/internal/connection/RealConnectionPool;->executor:Ljava/util/concurrent/Executor;
return-void
.end method
.method public constructor <init>(IJLjava/util/concurrent/TimeUnit;)V
.locals 2
.line 74
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 53
new-instance v0, Lokhttp3/internal/connection/RealConnectionPool$$ExternalSyntheticLambda0;
invoke-direct {v0, p0}, Lokhttp3/internal/connection/RealConnectionPool$$ExternalSyntheticLambda0;-><init>(Lokhttp3/internal/connection/RealConnectionPool;)V
iput-object v0, p0, Lokhttp3/internal/connection/RealConnectionPool;->cleanupRunnable:Ljava/lang/Runnable;
.line 70
new-instance v0, Ljava/util/ArrayDeque;
invoke-direct {v0}, Ljava/util/ArrayDeque;-><init>()V
iput-object v0, p0, Lokhttp3/internal/connection/RealConnectionPool;->connections:Ljava/util/Deque;
.line 71
new-instance v0, Lokhttp3/internal/connection/RouteDatabase;
invoke-direct {v0}, Lokhttp3/internal/connection/RouteDatabase;-><init>()V
iput-object v0, p0, Lokhttp3/internal/connection/RealConnectionPool;->routeDatabase:Lokhttp3/internal/connection/RouteDatabase;
iput p1, p0, Lokhttp3/internal/connection/RealConnectionPool;->maxIdleConnections:I
.line 76
invoke-virtual {p4, p2, p3}, Ljava/util/concurrent/TimeUnit;->toNanos(J)J
move-result-wide v0
iput-wide v0, p0, Lokhttp3/internal/connection/RealConnectionPool;->keepAliveDurationNs:J
const-wide/16 v0, 0x0
cmp-long p1, p2, v0
if-lez p1, :cond_0
return-void
.line 80
:cond_0
new-instance p1, Ljava/lang/IllegalArgumentException;
new-instance p4, Ljava/lang/StringBuilder;
invoke-direct {p4}, Ljava/lang/StringBuilder;-><init>()V
const-string v0, "keepAliveDuration <= 0: "
invoke-virtual {p4, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p4, p2, p3}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
invoke-virtual {p4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p2
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
.end method
# virtual methods
.method public cleanup(J)J
.locals 11
.line 172
monitor-enter p0
:try_start_0
iget-object v0, p0, Lokhttp3/internal/connection/RealConnectionPool;->connections:Ljava/util/Deque;
.line 173
invoke-interface {v0}, Ljava/util/Deque;->iterator()Ljava/util/Iterator;
move-result-object v0
const/4 v1, 0x0
const/4 v2, 0x0
const-wide/high16 v3, -0x8000000000000000L
move v5, v1
move v6, v5
:cond_0
:goto_0
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v7
if-eqz v7, :cond_2
.line 174
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v7
check-cast v7, Lokhttp3/internal/connection/RealConnection;
.line 177
invoke-virtual {p0, v7, p1, p2}, Lokhttp3/internal/connection/RealConnectionPool;->pruneAndGetAllocationCount(Lokhttp3/internal/connection/RealConnection;J)I
move-result v8
if-lez v8, :cond_1
add-int/lit8 v6, v6, 0x1
goto :goto_0
:cond_1
add-int/lit8 v5, v5, 0x1
.line 185
iget-wide v8, v7, Lokhttp3/internal/connection/RealConnection;->idleAtNanos:J
sub-long v8, p1, v8
cmp-long v10, v8, v3
if-lez v10, :cond_0
move-object v2, v7
move-wide v3, v8
goto :goto_0
:catchall_0
move-exception p1
goto :goto_2
:cond_2
iget-wide p1, p0, Lokhttp3/internal/connection/RealConnectionPool;->keepAliveDurationNs:J
cmp-long v0, v3, p1
if-gez v0, :cond_6
iget v0, p0, Lokhttp3/internal/connection/RealConnectionPool;->maxIdleConnections:I
if-le v5, v0, :cond_3
goto :goto_1
:cond_3
if-lez v5, :cond_4
sub-long/2addr p1, v3
.line 199
monitor-exit p0
return-wide p1
:cond_4
if-lez v6, :cond_5
.line 202
monitor-exit p0
return-wide p1
:cond_5
iput-boolean v1, p0, Lokhttp3/internal/connection/RealConnectionPool;->cleanupRunning:Z
.line 206
monitor-exit p0
const-wide/16 p1, -0x1
return-wide p1
:cond_6
:goto_1
iget-object p1, p0, Lokhttp3/internal/connection/RealConnectionPool;->connections:Ljava/util/Deque;
.line 196
invoke-interface {p1, v2}, Ljava/util/Deque;->remove(Ljava/lang/Object;)Z
.line 208
monitor-exit p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 210
invoke-virtual {v2}, Lokhttp3/internal/connection/RealConnection;->socket()Ljava/net/Socket;
move-result-object p1
invoke-static {p1}, Lokhttp3/internal/Util;->closeQuietly(Ljava/net/Socket;)V
const-wide/16 p1, 0x0
return-wide p1
.line 208
:goto_2
:try_start_1
monitor-exit p0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
throw p1
.end method
.method public connectFailed(Lokhttp3/Route;Ljava/io/IOException;)V
.locals 3
.line 254
invoke-virtual {p1}, Lokhttp3/Route;->proxy()Ljava/net/Proxy;
move-result-object v0
invoke-virtual {v0}, Ljava/net/Proxy;->type()Ljava/net/Proxy$Type;
move-result-object v0
sget-object v1, Ljava/net/Proxy$Type;->DIRECT:Ljava/net/Proxy$Type;
if-eq v0, v1, :cond_0
.line 255
invoke-virtual {p1}, Lokhttp3/Route;->address()Lokhttp3/Address;
move-result-object v0
.line 256
invoke-virtual {v0}, Lokhttp3/Address;->proxySelector()Ljava/net/ProxySelector;
move-result-object v1
.line 257
invoke-virtual {v0}, Lokhttp3/Address;->url()Lokhttp3/HttpUrl;
move-result-object v0
invoke-virtual {v0}, Lokhttp3/HttpUrl;->uri()Ljava/net/URI;
move-result-object v0
invoke-virtual {p1}, Lokhttp3/Route;->proxy()Ljava/net/Proxy;
move-result-object v2
invoke-virtual {v2}, Ljava/net/Proxy;->address()Ljava/net/SocketAddress;
move-result-object v2
.line 256
invoke-virtual {v1, v0, v2, p2}, Ljava/net/ProxySelector;->connectFailed(Ljava/net/URI;Ljava/net/SocketAddress;Ljava/io/IOException;)V
:cond_0
iget-object p2, p0, Lokhttp3/internal/connection/RealConnectionPool;->routeDatabase:Lokhttp3/internal/connection/RouteDatabase;
.line 260
invoke-virtual {p2, p1}, Lokhttp3/internal/connection/RouteDatabase;->failed(Lokhttp3/Route;)V
return-void
.end method
.method public connectionBecameIdle(Lokhttp3/internal/connection/RealConnection;)Z
.locals 1
.line 131
iget-boolean v0, p1, Lokhttp3/internal/connection/RealConnection;->noNewExchanges:Z
if-nez v0, :cond_1
iget v0, p0, Lokhttp3/internal/connection/RealConnectionPool;->maxIdleConnections:I
if-nez v0, :cond_0
goto :goto_0
.line 135
:cond_0
invoke-virtual {p0}, Ljava/lang/Object;->notifyAll()V
const/4 p1, 0x0
return p1
:cond_1
:goto_0
iget-object v0, p0, Lokhttp3/internal/connection/RealConnectionPool;->connections:Ljava/util/Deque;
.line 132
invoke-interface {v0, p1}, Ljava/util/Deque;->remove(Ljava/lang/Object;)Z
const/4 p1, 0x1
return p1
.end method
.method public final synthetic lambda$new$0()V
.locals 6
.line 55
:cond_0
:goto_0
invoke-static {}, Ljava/lang/System;->nanoTime()J
move-result-wide v0
invoke-virtual {p0, v0, v1}, Lokhttp3/internal/connection/RealConnectionPool;->cleanup(J)J
move-result-wide v0
const-wide/16 v2, -0x1
cmp-long v2, v0, v2
if-nez v2, :cond_1
return-void
:cond_1
const-wide/16 v2, 0x0
cmp-long v2, v0, v2
if-lez v2, :cond_0
const-wide/32 v2, 0xf4240
.line 58
div-long v4, v0, v2
mul-long/2addr v2, v4
sub-long/2addr v0, v2
.line 60
monitor-enter p0
long-to-int v0, v0
.line 62
:try_start_0
invoke-virtual {p0, v4, v5, v0}, Ljava/lang/Object;->wait(JI)V
:try_end_0
.catch Ljava/lang/InterruptedException; {:try_start_0 .. :try_end_0} :catch_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
goto :goto_1
:catchall_0
move-exception v0
goto :goto_2
.line 65
:catch_0
:goto_1
:try_start_1
monitor-exit p0
goto :goto_0
:goto_2
monitor-exit p0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
throw v0
.end method
.method public final pruneAndGetAllocationCount(Lokhttp3/internal/connection/RealConnection;J)I
.locals 6
.line 223
iget-object v0, p1, Lokhttp3/internal/connection/RealConnection;->transmitters:Ljava/util/List;
const/4 v1, 0x0
move v2, v1
.line 224
:cond_0
:goto_0
invoke-interface {v0}, Ljava/util/List;->size()I
move-result v3
if-ge v2, v3, :cond_2
.line 225
invoke-interface {v0, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v3
check-cast v3, Ljava/lang/ref/Reference;
.line 227
invoke-virtual {v3}, Ljava/lang/ref/Reference;->get()Ljava/lang/Object;
move-result-object v4
if-eqz v4, :cond_1
add-int/lit8 v2, v2, 0x1
goto :goto_0
.line 233
:cond_1
check-cast v3, Lokhttp3/internal/connection/Transmitter$TransmitterReference;
.line 234
new-instance v4, Ljava/lang/StringBuilder;
invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V
const-string v5, "A connection to "
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p1}, Lokhttp3/internal/connection/RealConnection;->route()Lokhttp3/Route;
move-result-object v5
invoke-virtual {v5}, Lokhttp3/Route;->address()Lokhttp3/Address;
move-result-object v5
invoke-virtual {v5}, Lokhttp3/Address;->url()Lokhttp3/HttpUrl;
move-result-object v5
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
const-string v5, " was leaked. Did you forget to close a response body?"
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v4
.line 236
invoke-static {}, Lokhttp3/internal/platform/Platform;->get()Lokhttp3/internal/platform/Platform;
move-result-object v5
iget-object v3, v3, Lokhttp3/internal/connection/Transmitter$TransmitterReference;->callStackTrace:Ljava/lang/Object;
invoke-virtual {v5, v4, v3}, Lokhttp3/internal/platform/Platform;->logCloseableLeak(Ljava/lang/String;Ljava/lang/Object;)V
.line 238
invoke-interface {v0, v2}, Ljava/util/List;->remove(I)Ljava/lang/Object;
const/4 v3, 0x1
.line 239
iput-boolean v3, p1, Lokhttp3/internal/connection/RealConnection;->noNewExchanges:Z
.line 242
invoke-interface {v0}, Ljava/util/List;->isEmpty()Z
move-result v3
if-eqz v3, :cond_0
iget-wide v2, p0, Lokhttp3/internal/connection/RealConnectionPool;->keepAliveDurationNs:J
sub-long/2addr p2, v2
.line 243
iput-wide p2, p1, Lokhttp3/internal/connection/RealConnection;->idleAtNanos:J
return v1
.line 248
:cond_2
invoke-interface {v0}, Ljava/util/List;->size()I
move-result p1
return p1
.end method
.method public put(Lokhttp3/internal/connection/RealConnection;)V
.locals 2
iget-boolean v0, p0, Lokhttp3/internal/connection/RealConnectionPool;->cleanupRunning:Z
if-nez v0, :cond_0
const/4 v0, 0x1
iput-boolean v0, p0, Lokhttp3/internal/connection/RealConnectionPool;->cleanupRunning:Z
sget-object v0, Lokhttp3/internal/connection/RealConnectionPool;->executor:Ljava/util/concurrent/Executor;
iget-object v1, p0, Lokhttp3/internal/connection/RealConnectionPool;->cleanupRunnable:Ljava/lang/Runnable;
.line 120
invoke-interface {v0, v1}, Ljava/util/concurrent/Executor;->execute(Ljava/lang/Runnable;)V
:cond_0
iget-object v0, p0, Lokhttp3/internal/connection/RealConnectionPool;->connections:Ljava/util/Deque;
.line 122
invoke-interface {v0, p1}, Ljava/util/Deque;->add(Ljava/lang/Object;)Z
return-void
.end method
.method public transmitterAcquirePooledConnection(Lokhttp3/Address;Lokhttp3/internal/connection/Transmitter;Ljava/util/List;Z)Z
.locals 3
iget-object v0, p0, Lokhttp3/internal/connection/RealConnectionPool;->connections:Ljava/util/Deque;
.line 107
invoke-interface {v0}, Ljava/util/Deque;->iterator()Ljava/util/Iterator;
move-result-object v0
:goto_0
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v1
if-eqz v1, :cond_2
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v1
check-cast v1, Lokhttp3/internal/connection/RealConnection;
if-eqz p4, :cond_0
.line 108
invoke-virtual {v1}, Lokhttp3/internal/connection/RealConnection;->isMultiplexed()Z
move-result v2
if-nez v2, :cond_0
goto :goto_0
.line 109
:cond_0
invoke-virtual {v1, p1, p3}, Lokhttp3/internal/connection/RealConnection;->isEligible(Lokhttp3/Address;Ljava/util/List;)Z
move-result v2
if-nez v2, :cond_1
goto :goto_0
.line 110
:cond_1
invoke-virtual {p2, v1}, Lokhttp3/internal/connection/Transmitter;->acquireConnectionNoEvents(Lokhttp3/internal/connection/RealConnection;)V
const/4 p1, 0x1
return p1
:cond_2
const/4 p1, 0x0
return p1
.end method

View File

@@ -0,0 +1,106 @@
.class public final Lokhttp3/internal/connection/RouteDatabase;
.super Ljava/lang/Object;
.source "SourceFile"
# instance fields
.field public final failedRoutes:Ljava/util/Set;
# direct methods
.method public constructor <init>()V
.locals 1
.line 28
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 29
new-instance v0, Ljava/util/LinkedHashSet;
invoke-direct {v0}, Ljava/util/LinkedHashSet;-><init>()V
iput-object v0, p0, Lokhttp3/internal/connection/RouteDatabase;->failedRoutes:Ljava/util/Set;
return-void
.end method
# virtual methods
.method public declared-synchronized connected(Lokhttp3/Route;)V
.locals 1
monitor-enter p0
:try_start_0
iget-object v0, p0, Lokhttp3/internal/connection/RouteDatabase;->failedRoutes:Ljava/util/Set;
.line 38
invoke-interface {v0, p1}, Ljava/util/Set;->remove(Ljava/lang/Object;)Z
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 39
monitor-exit p0
return-void
:catchall_0
move-exception p1
monitor-exit p0
throw p1
.end method
.method public declared-synchronized failed(Lokhttp3/Route;)V
.locals 1
monitor-enter p0
:try_start_0
iget-object v0, p0, Lokhttp3/internal/connection/RouteDatabase;->failedRoutes:Ljava/util/Set;
.line 33
invoke-interface {v0, p1}, Ljava/util/Set;->add(Ljava/lang/Object;)Z
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 34
monitor-exit p0
return-void
:catchall_0
move-exception p1
monitor-exit p0
throw p1
.end method
.method public declared-synchronized shouldPostpone(Lokhttp3/Route;)Z
.locals 1
monitor-enter p0
:try_start_0
iget-object v0, p0, Lokhttp3/internal/connection/RouteDatabase;->failedRoutes:Ljava/util/Set;
.line 43
invoke-interface {v0, p1}, Ljava/util/Set;->contains(Ljava/lang/Object;)Z
move-result p1
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
monitor-exit p0
return p1
:catchall_0
move-exception p1
monitor-exit p0
throw p1
.end method

View File

@@ -0,0 +1,55 @@
.class public final Lokhttp3/internal/connection/RouteException;
.super Ljava/lang/RuntimeException;
.source "SourceFile"
# instance fields
.field public firstException:Ljava/io/IOException;
.field public lastException:Ljava/io/IOException;
# direct methods
.method public constructor <init>(Ljava/io/IOException;)V
.locals 0
.line 31
invoke-direct {p0, p1}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/Throwable;)V
iput-object p1, p0, Lokhttp3/internal/connection/RouteException;->firstException:Ljava/io/IOException;
iput-object p1, p0, Lokhttp3/internal/connection/RouteException;->lastException:Ljava/io/IOException;
return-void
.end method
# virtual methods
.method public addConnectException(Ljava/io/IOException;)V
.locals 1
iget-object v0, p0, Lokhttp3/internal/connection/RouteException;->firstException:Ljava/io/IOException;
.line 45
invoke-static {v0, p1}, Lokhttp3/internal/Util;->addSuppressedIfPossible(Ljava/lang/Throwable;Ljava/lang/Throwable;)V
iput-object p1, p0, Lokhttp3/internal/connection/RouteException;->lastException:Ljava/io/IOException;
return-void
.end method
.method public getFirstConnectException()Ljava/io/IOException;
.locals 1
iget-object v0, p0, Lokhttp3/internal/connection/RouteException;->firstException:Ljava/io/IOException;
return-object v0
.end method
.method public getLastConnectException()Ljava/io/IOException;
.locals 1
iget-object v0, p0, Lokhttp3/internal/connection/RouteException;->lastException:Ljava/io/IOException;
return-object v0
.end method

View File

@@ -0,0 +1,113 @@
.class public final Lokhttp3/internal/connection/RouteSelector$Selection;
.super Ljava/lang/Object;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lokhttp3/internal/connection/RouteSelector;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "Selection"
.end annotation
# instance fields
.field public nextRouteIndex:I
.field public final routes:Ljava/util/List;
# direct methods
.method public constructor <init>(Ljava/util/List;)V
.locals 1
.line 208
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
const/4 v0, 0x0
iput v0, p0, Lokhttp3/internal/connection/RouteSelector$Selection;->nextRouteIndex:I
iput-object p1, p0, Lokhttp3/internal/connection/RouteSelector$Selection;->routes:Ljava/util/List;
return-void
.end method
# virtual methods
.method public getAll()Ljava/util/List;
.locals 2
.line 224
new-instance v0, Ljava/util/ArrayList;
iget-object v1, p0, Lokhttp3/internal/connection/RouteSelector$Selection;->routes:Ljava/util/List;
invoke-direct {v0, v1}, Ljava/util/ArrayList;-><init>(Ljava/util/Collection;)V
return-object v0
.end method
.method public hasNext()Z
.locals 2
iget v0, p0, Lokhttp3/internal/connection/RouteSelector$Selection;->nextRouteIndex:I
iget-object v1, p0, Lokhttp3/internal/connection/RouteSelector$Selection;->routes:Ljava/util/List;
.line 213
invoke-interface {v1}, Ljava/util/List;->size()I
move-result v1
if-ge v0, v1, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
return v0
.end method
.method public next()Lokhttp3/Route;
.locals 3
.line 217
invoke-virtual {p0}, Lokhttp3/internal/connection/RouteSelector$Selection;->hasNext()Z
move-result v0
if-eqz v0, :cond_0
iget-object v0, p0, Lokhttp3/internal/connection/RouteSelector$Selection;->routes:Ljava/util/List;
iget v1, p0, Lokhttp3/internal/connection/RouteSelector$Selection;->nextRouteIndex:I
add-int/lit8 v2, v1, 0x1
iput v2, p0, Lokhttp3/internal/connection/RouteSelector$Selection;->nextRouteIndex:I
.line 220
invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v0
check-cast v0, Lokhttp3/Route;
return-object v0
.line 218
:cond_0
new-instance v0, Ljava/util/NoSuchElementException;
invoke-direct {v0}, Ljava/util/NoSuchElementException;-><init>()V
throw v0
.end method

View File

@@ -0,0 +1,696 @@
.class public final Lokhttp3/internal/connection/RouteSelector;
.super Ljava/lang/Object;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lokhttp3/internal/connection/RouteSelector$Selection;
}
.end annotation
# instance fields
.field public final address:Lokhttp3/Address;
.field public final call:Lokhttp3/Call;
.field public final eventListener:Lokhttp3/EventListener;
.field public inetSocketAddresses:Ljava/util/List;
.field public nextProxyIndex:I
.field public final postponedRoutes:Ljava/util/List;
.field public proxies:Ljava/util/List;
.field public final routeDatabase:Lokhttp3/internal/connection/RouteDatabase;
# direct methods
.method public constructor <init>(Lokhttp3/Address;Lokhttp3/internal/connection/RouteDatabase;Lokhttp3/Call;Lokhttp3/EventListener;)V
.locals 1
.line 57
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 47
invoke-static {}, Ljava/util/Collections;->emptyList()Ljava/util/List;
move-result-object v0
iput-object v0, p0, Lokhttp3/internal/connection/RouteSelector;->proxies:Ljava/util/List;
.line 51
invoke-static {}, Ljava/util/Collections;->emptyList()Ljava/util/List;
move-result-object v0
iput-object v0, p0, Lokhttp3/internal/connection/RouteSelector;->inetSocketAddresses:Ljava/util/List;
.line 54
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
iput-object v0, p0, Lokhttp3/internal/connection/RouteSelector;->postponedRoutes:Ljava/util/List;
iput-object p1, p0, Lokhttp3/internal/connection/RouteSelector;->address:Lokhttp3/Address;
iput-object p2, p0, Lokhttp3/internal/connection/RouteSelector;->routeDatabase:Lokhttp3/internal/connection/RouteDatabase;
iput-object p3, p0, Lokhttp3/internal/connection/RouteSelector;->call:Lokhttp3/Call;
iput-object p4, p0, Lokhttp3/internal/connection/RouteSelector;->eventListener:Lokhttp3/EventListener;
.line 63
invoke-virtual {p1}, Lokhttp3/Address;->url()Lokhttp3/HttpUrl;
move-result-object p2
invoke-virtual {p1}, Lokhttp3/Address;->proxy()Ljava/net/Proxy;
move-result-object p1
invoke-virtual {p0, p2, p1}, Lokhttp3/internal/connection/RouteSelector;->resetNextProxy(Lokhttp3/HttpUrl;Ljava/net/Proxy;)V
return-void
.end method
.method public static getHostString(Ljava/net/InetSocketAddress;)Ljava/lang/String;
.locals 1
.line 191
invoke-virtual {p0}, Ljava/net/InetSocketAddress;->getAddress()Ljava/net/InetAddress;
move-result-object v0
if-nez v0, :cond_0
.line 196
invoke-virtual {p0}, Ljava/net/InetSocketAddress;->getHostName()Ljava/lang/String;
move-result-object p0
return-object p0
.line 200
:cond_0
invoke-virtual {v0}, Ljava/net/InetAddress;->getHostAddress()Ljava/lang/String;
move-result-object p0
return-object p0
.end method
# virtual methods
.method public hasNext()Z
.locals 1
.line 70
invoke-virtual {p0}, Lokhttp3/internal/connection/RouteSelector;->hasNextProxy()Z
move-result v0
if-nez v0, :cond_1
iget-object v0, p0, Lokhttp3/internal/connection/RouteSelector;->postponedRoutes:Ljava/util/List;
invoke-interface {v0}, Ljava/util/List;->isEmpty()Z
move-result v0
if-nez v0, :cond_0
goto :goto_0
:cond_0
const/4 v0, 0x0
goto :goto_1
:cond_1
:goto_0
const/4 v0, 0x1
:goto_1
return v0
.end method
.method public final hasNextProxy()Z
.locals 2
iget v0, p0, Lokhttp3/internal/connection/RouteSelector;->nextProxyIndex:I
iget-object v1, p0, Lokhttp3/internal/connection/RouteSelector;->proxies:Ljava/util/List;
.line 125
invoke-interface {v1}, Ljava/util/List;->size()I
move-result v1
if-ge v0, v1, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
return v0
.end method
.method public next()Lokhttp3/internal/connection/RouteSelector$Selection;
.locals 7
.line 74
invoke-virtual {p0}, Lokhttp3/internal/connection/RouteSelector;->hasNext()Z
move-result v0
if-eqz v0, :cond_5
.line 79
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
.line 80
:cond_0
invoke-virtual {p0}, Lokhttp3/internal/connection/RouteSelector;->hasNextProxy()Z
move-result v1
if-eqz v1, :cond_3
.line 84
invoke-virtual {p0}, Lokhttp3/internal/connection/RouteSelector;->nextProxy()Ljava/net/Proxy;
move-result-object v1
iget-object v2, p0, Lokhttp3/internal/connection/RouteSelector;->inetSocketAddresses:Ljava/util/List;
.line 85
invoke-interface {v2}, Ljava/util/List;->size()I
move-result v2
const/4 v3, 0x0
:goto_0
if-ge v3, v2, :cond_2
.line 86
new-instance v4, Lokhttp3/Route;
iget-object v5, p0, Lokhttp3/internal/connection/RouteSelector;->address:Lokhttp3/Address;
iget-object v6, p0, Lokhttp3/internal/connection/RouteSelector;->inetSocketAddresses:Ljava/util/List;
invoke-interface {v6, v3}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v6
check-cast v6, Ljava/net/InetSocketAddress;
invoke-direct {v4, v5, v1, v6}, Lokhttp3/Route;-><init>(Lokhttp3/Address;Ljava/net/Proxy;Ljava/net/InetSocketAddress;)V
iget-object v5, p0, Lokhttp3/internal/connection/RouteSelector;->routeDatabase:Lokhttp3/internal/connection/RouteDatabase;
.line 87
invoke-virtual {v5, v4}, Lokhttp3/internal/connection/RouteDatabase;->shouldPostpone(Lokhttp3/Route;)Z
move-result v5
if-eqz v5, :cond_1
iget-object v5, p0, Lokhttp3/internal/connection/RouteSelector;->postponedRoutes:Ljava/util/List;
.line 88
invoke-interface {v5, v4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
goto :goto_1
.line 90
:cond_1
invoke-interface {v0, v4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
:goto_1
add-int/lit8 v3, v3, 0x1
goto :goto_0
.line 94
:cond_2
invoke-interface {v0}, Ljava/util/List;->isEmpty()Z
move-result v1
if-nez v1, :cond_0
.line 99
:cond_3
invoke-interface {v0}, Ljava/util/List;->isEmpty()Z
move-result v1
if-eqz v1, :cond_4
iget-object v1, p0, Lokhttp3/internal/connection/RouteSelector;->postponedRoutes:Ljava/util/List;
.line 101
invoke-interface {v0, v1}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z
iget-object v1, p0, Lokhttp3/internal/connection/RouteSelector;->postponedRoutes:Ljava/util/List;
.line 102
invoke-interface {v1}, Ljava/util/List;->clear()V
.line 105
:cond_4
new-instance v1, Lokhttp3/internal/connection/RouteSelector$Selection;
invoke-direct {v1, v0}, Lokhttp3/internal/connection/RouteSelector$Selection;-><init>(Ljava/util/List;)V
return-object v1
.line 75
:cond_5
new-instance v0, Ljava/util/NoSuchElementException;
invoke-direct {v0}, Ljava/util/NoSuchElementException;-><init>()V
throw v0
.end method
.method public final nextProxy()Ljava/net/Proxy;
.locals 3
.line 130
invoke-virtual {p0}, Lokhttp3/internal/connection/RouteSelector;->hasNextProxy()Z
move-result v0
if-eqz v0, :cond_0
iget-object v0, p0, Lokhttp3/internal/connection/RouteSelector;->proxies:Ljava/util/List;
iget v1, p0, Lokhttp3/internal/connection/RouteSelector;->nextProxyIndex:I
add-int/lit8 v2, v1, 0x1
iput v2, p0, Lokhttp3/internal/connection/RouteSelector;->nextProxyIndex:I
.line 134
invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/net/Proxy;
.line 135
invoke-virtual {p0, v0}, Lokhttp3/internal/connection/RouteSelector;->resetNextInetSocketAddress(Ljava/net/Proxy;)V
return-object v0
.line 131
:cond_0
new-instance v0, Ljava/net/SocketException;
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "No route to "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object v2, p0, Lokhttp3/internal/connection/RouteSelector;->address:Lokhttp3/Address;
invoke-virtual {v2}, Lokhttp3/Address;->url()Lokhttp3/HttpUrl;
move-result-object v2
invoke-virtual {v2}, Lokhttp3/HttpUrl;->host()Ljava/lang/String;
move-result-object v2
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string v2, "; exhausted proxy configurations: "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object v2, p0, Lokhttp3/internal/connection/RouteSelector;->proxies:Ljava/util/List;
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-direct {v0, v1}, Ljava/net/SocketException;-><init>(Ljava/lang/String;)V
throw v0
.end method
.method public final resetNextInetSocketAddress(Ljava/net/Proxy;)V
.locals 6
.line 142
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
iput-object v0, p0, Lokhttp3/internal/connection/RouteSelector;->inetSocketAddresses:Ljava/util/List;
.line 146
invoke-virtual {p1}, Ljava/net/Proxy;->type()Ljava/net/Proxy$Type;
move-result-object v0
sget-object v1, Ljava/net/Proxy$Type;->DIRECT:Ljava/net/Proxy$Type;
if-eq v0, v1, :cond_2
invoke-virtual {p1}, Ljava/net/Proxy;->type()Ljava/net/Proxy$Type;
move-result-object v0
sget-object v1, Ljava/net/Proxy$Type;->SOCKS:Ljava/net/Proxy$Type;
if-ne v0, v1, :cond_0
goto :goto_0
.line 150
:cond_0
invoke-virtual {p1}, Ljava/net/Proxy;->address()Ljava/net/SocketAddress;
move-result-object v0
.line 151
instance-of v1, v0, Ljava/net/InetSocketAddress;
if-eqz v1, :cond_1
.line 155
check-cast v0, Ljava/net/InetSocketAddress;
.line 156
invoke-static {v0}, Lokhttp3/internal/connection/RouteSelector;->getHostString(Ljava/net/InetSocketAddress;)Ljava/lang/String;
move-result-object v1
.line 157
invoke-virtual {v0}, Ljava/net/InetSocketAddress;->getPort()I
move-result v0
goto :goto_1
.line 152
:cond_1
new-instance p1, Ljava/lang/IllegalArgumentException;
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "Proxy.address() is not an InetSocketAddress: "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
.line 153
invoke-virtual {v0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object v0
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
:cond_2
:goto_0
iget-object v0, p0, Lokhttp3/internal/connection/RouteSelector;->address:Lokhttp3/Address;
.line 147
invoke-virtual {v0}, Lokhttp3/Address;->url()Lokhttp3/HttpUrl;
move-result-object v0
invoke-virtual {v0}, Lokhttp3/HttpUrl;->host()Ljava/lang/String;
move-result-object v1
iget-object v0, p0, Lokhttp3/internal/connection/RouteSelector;->address:Lokhttp3/Address;
.line 148
invoke-virtual {v0}, Lokhttp3/Address;->url()Lokhttp3/HttpUrl;
move-result-object v0
invoke-virtual {v0}, Lokhttp3/HttpUrl;->port()I
move-result v0
:goto_1
const/4 v2, 0x1
if-lt v0, v2, :cond_6
const v2, 0xffff
if-gt v0, v2, :cond_6
.line 165
invoke-virtual {p1}, Ljava/net/Proxy;->type()Ljava/net/Proxy$Type;
move-result-object p1
sget-object v2, Ljava/net/Proxy$Type;->SOCKS:Ljava/net/Proxy$Type;
if-ne p1, v2, :cond_3
iget-object p1, p0, Lokhttp3/internal/connection/RouteSelector;->inetSocketAddresses:Ljava/util/List;
.line 166
invoke-static {v1, v0}, Ljava/net/InetSocketAddress;->createUnresolved(Ljava/lang/String;I)Ljava/net/InetSocketAddress;
move-result-object v0
invoke-interface {p1, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z
goto :goto_3
:cond_3
iget-object p1, p0, Lokhttp3/internal/connection/RouteSelector;->eventListener:Lokhttp3/EventListener;
iget-object v2, p0, Lokhttp3/internal/connection/RouteSelector;->call:Lokhttp3/Call;
.line 168
invoke-virtual {p1, v2, v1}, Lokhttp3/EventListener;->dnsStart(Lokhttp3/Call;Ljava/lang/String;)V
iget-object p1, p0, Lokhttp3/internal/connection/RouteSelector;->address:Lokhttp3/Address;
.line 171
invoke-virtual {p1}, Lokhttp3/Address;->dns()Lokhttp3/Dns;
move-result-object p1
invoke-interface {p1, v1}, Lokhttp3/Dns;->lookup(Ljava/lang/String;)Ljava/util/List;
move-result-object p1
.line 172
invoke-interface {p1}, Ljava/util/List;->isEmpty()Z
move-result v2
if-nez v2, :cond_5
iget-object v2, p0, Lokhttp3/internal/connection/RouteSelector;->eventListener:Lokhttp3/EventListener;
iget-object v3, p0, Lokhttp3/internal/connection/RouteSelector;->call:Lokhttp3/Call;
.line 176
invoke-virtual {v2, v3, v1, p1}, Lokhttp3/EventListener;->dnsEnd(Lokhttp3/Call;Ljava/lang/String;Ljava/util/List;)V
.line 178
invoke-interface {p1}, Ljava/util/List;->size()I
move-result v1
const/4 v2, 0x0
:goto_2
if-ge v2, v1, :cond_4
.line 179
invoke-interface {p1, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v3
check-cast v3, Ljava/net/InetAddress;
iget-object v4, p0, Lokhttp3/internal/connection/RouteSelector;->inetSocketAddresses:Ljava/util/List;
.line 180
new-instance v5, Ljava/net/InetSocketAddress;
invoke-direct {v5, v3, v0}, Ljava/net/InetSocketAddress;-><init>(Ljava/net/InetAddress;I)V
invoke-interface {v4, v5}, Ljava/util/List;->add(Ljava/lang/Object;)Z
add-int/lit8 v2, v2, 0x1
goto :goto_2
:cond_4
:goto_3
return-void
.line 173
:cond_5
new-instance p1, Ljava/net/UnknownHostException;
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
iget-object v2, p0, Lokhttp3/internal/connection/RouteSelector;->address:Lokhttp3/Address;
invoke-virtual {v2}, Lokhttp3/Address;->dns()Lokhttp3/Dns;
move-result-object v2
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
const-string v2, " returned no addresses for "
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
invoke-direct {p1, v0}, Ljava/net/UnknownHostException;-><init>(Ljava/lang/String;)V
throw p1
.line 161
:cond_6
new-instance p1, Ljava/net/SocketException;
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
const-string v3, "No route to "
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string v1, ":"
invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
const-string v0, "; port is out of range"
invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
invoke-direct {p1, v0}, Ljava/net/SocketException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public final resetNextProxy(Lokhttp3/HttpUrl;Ljava/net/Proxy;)V
.locals 1
const/4 v0, 0x0
if-eqz p2, :cond_0
.line 112
invoke-static {p2}, Ljava/util/Collections;->singletonList(Ljava/lang/Object;)Ljava/util/List;
move-result-object p1
iput-object p1, p0, Lokhttp3/internal/connection/RouteSelector;->proxies:Ljava/util/List;
goto :goto_1
:cond_0
iget-object p2, p0, Lokhttp3/internal/connection/RouteSelector;->address:Lokhttp3/Address;
.line 115
invoke-virtual {p2}, Lokhttp3/Address;->proxySelector()Ljava/net/ProxySelector;
move-result-object p2
invoke-virtual {p1}, Lokhttp3/HttpUrl;->uri()Ljava/net/URI;
move-result-object p1
invoke-virtual {p2, p1}, Ljava/net/ProxySelector;->select(Ljava/net/URI;)Ljava/util/List;
move-result-object p1
if-eqz p1, :cond_1
.line 116
invoke-interface {p1}, Ljava/util/List;->isEmpty()Z
move-result p2
if-nez p2, :cond_1
.line 117
invoke-static {p1}, Lokhttp3/internal/Util;->immutableList(Ljava/util/List;)Ljava/util/List;
move-result-object p1
goto :goto_0
:cond_1
const/4 p1, 0x1
new-array p1, p1, [Ljava/net/Proxy;
.line 118
sget-object p2, Ljava/net/Proxy;->NO_PROXY:Ljava/net/Proxy;
aput-object p2, p1, v0
invoke-static {p1}, Lokhttp3/internal/Util;->immutableList([Ljava/lang/Object;)Ljava/util/List;
move-result-object p1
:goto_0
iput-object p1, p0, Lokhttp3/internal/connection/RouteSelector;->proxies:Ljava/util/List;
:goto_1
iput v0, p0, Lokhttp3/internal/connection/RouteSelector;->nextProxyIndex:I
return-void
.end method

View File

@@ -0,0 +1,44 @@
.class public Lokhttp3/internal/connection/Transmitter$1;
.super Lokio/AsyncTimeout;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lokhttp3/internal/connection/Transmitter;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1
name = null
.end annotation
# instance fields
.field public final synthetic this$0:Lokhttp3/internal/connection/Transmitter;
# direct methods
.method public constructor <init>(Lokhttp3/internal/connection/Transmitter;)V
.locals 0
iput-object p1, p0, Lokhttp3/internal/connection/Transmitter$1;->this$0:Lokhttp3/internal/connection/Transmitter;
.line 59
invoke-direct {p0}, Lokio/AsyncTimeout;-><init>()V
return-void
.end method
# virtual methods
.method public timedOut()V
.locals 1
iget-object v0, p0, Lokhttp3/internal/connection/Transmitter$1;->this$0:Lokhttp3/internal/connection/Transmitter;
.line 61
invoke-virtual {v0}, Lokhttp3/internal/connection/Transmitter;->cancel()V
return-void
.end method

View File

@@ -0,0 +1,31 @@
.class public final Lokhttp3/internal/connection/Transmitter$TransmitterReference;
.super Ljava/lang/ref/WeakReference;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lokhttp3/internal/connection/Transmitter;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "TransmitterReference"
.end annotation
# instance fields
.field public final callStackTrace:Ljava/lang/Object;
# direct methods
.method public constructor <init>(Lokhttp3/internal/connection/Transmitter;Ljava/lang/Object;)V
.locals 0
.line 362
invoke-direct {p0, p1}, Ljava/lang/ref/WeakReference;-><init>(Ljava/lang/Object;)V
iput-object p2, p0, Lokhttp3/internal/connection/Transmitter$TransmitterReference;->callStackTrace:Ljava/lang/Object;
return-void
.end method

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,390 @@
.class public final Lokhttp3/internal/http/BridgeInterceptor;
.super Ljava/lang/Object;
.source "SourceFile"
# interfaces
.implements Lokhttp3/Interceptor;
# instance fields
.field public final cookieJar:Lokhttp3/CookieJar;
# direct methods
.method public constructor <init>(Lokhttp3/CookieJar;)V
.locals 0
.line 43
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Lokhttp3/internal/http/BridgeInterceptor;->cookieJar:Lokhttp3/CookieJar;
return-void
.end method
# virtual methods
.method public final cookieHeader(Ljava/util/List;)Ljava/lang/String;
.locals 5
.line 118
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
.line 119
invoke-interface {p1}, Ljava/util/List;->size()I
move-result v1
const/4 v2, 0x0
:goto_0
if-ge v2, v1, :cond_1
if-lez v2, :cond_0
const-string v3, "; "
.line 121
invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
.line 123
:cond_0
invoke-interface {p1, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v3
check-cast v3, Lokhttp3/Cookie;
.line 124
invoke-virtual {v3}, Lokhttp3/Cookie;->name()Ljava/lang/String;
move-result-object v4
invoke-virtual {v0, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const/16 v4, 0x3d
invoke-virtual {v0, v4}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
invoke-virtual {v3}, Lokhttp3/Cookie;->value()Ljava/lang/String;
move-result-object v3
invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
add-int/lit8 v2, v2, 0x1
goto :goto_0
.line 126
:cond_1
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
return-object p1
.end method
.method public intercept(Lokhttp3/Interceptor$Chain;)Lokhttp3/Response;
.locals 10
.line 48
invoke-interface {p1}, Lokhttp3/Interceptor$Chain;->request()Lokhttp3/Request;
move-result-object v0
.line 49
invoke-virtual {v0}, Lokhttp3/Request;->newBuilder()Lokhttp3/Request$Builder;
move-result-object v1
.line 51
invoke-virtual {v0}, Lokhttp3/Request;->body()Lokhttp3/RequestBody;
move-result-object v2
const-wide/16 v3, -0x1
const-string v5, "Content-Type"
const-string v6, "Content-Length"
if-eqz v2, :cond_2
.line 53
invoke-virtual {v2}, Lokhttp3/RequestBody;->contentType()Lokhttp3/MediaType;
move-result-object v7
if-eqz v7, :cond_0
.line 55
invoke-virtual {v7}, Lokhttp3/MediaType;->toString()Ljava/lang/String;
move-result-object v7
invoke-virtual {v1, v5, v7}, Lokhttp3/Request$Builder;->header(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Request$Builder;
.line 58
:cond_0
invoke-virtual {v2}, Lokhttp3/RequestBody;->contentLength()J
move-result-wide v7
cmp-long v2, v7, v3
const-string v9, "Transfer-Encoding"
if-eqz v2, :cond_1
.line 60
invoke-static {v7, v8}, Ljava/lang/Long;->toString(J)Ljava/lang/String;
move-result-object v2
invoke-virtual {v1, v6, v2}, Lokhttp3/Request$Builder;->header(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Request$Builder;
.line 61
invoke-virtual {v1, v9}, Lokhttp3/Request$Builder;->removeHeader(Ljava/lang/String;)Lokhttp3/Request$Builder;
goto :goto_0
:cond_1
const-string v2, "chunked"
.line 63
invoke-virtual {v1, v9, v2}, Lokhttp3/Request$Builder;->header(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Request$Builder;
.line 64
invoke-virtual {v1, v6}, Lokhttp3/Request$Builder;->removeHeader(Ljava/lang/String;)Lokhttp3/Request$Builder;
:cond_2
:goto_0
const-string v2, "Host"
.line 68
invoke-virtual {v0, v2}, Lokhttp3/Request;->header(Ljava/lang/String;)Ljava/lang/String;
move-result-object v7
const/4 v8, 0x0
if-nez v7, :cond_3
.line 69
invoke-virtual {v0}, Lokhttp3/Request;->url()Lokhttp3/HttpUrl;
move-result-object v7
invoke-static {v7, v8}, Lokhttp3/internal/Util;->hostHeader(Lokhttp3/HttpUrl;Z)Ljava/lang/String;
move-result-object v7
invoke-virtual {v1, v2, v7}, Lokhttp3/Request$Builder;->header(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Request$Builder;
:cond_3
const-string v2, "Connection"
.line 72
invoke-virtual {v0, v2}, Lokhttp3/Request;->header(Ljava/lang/String;)Ljava/lang/String;
move-result-object v7
if-nez v7, :cond_4
const-string v7, "Keep-Alive"
.line 73
invoke-virtual {v1, v2, v7}, Lokhttp3/Request$Builder;->header(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Request$Builder;
:cond_4
const-string v2, "Accept-Encoding"
.line 79
invoke-virtual {v0, v2}, Lokhttp3/Request;->header(Ljava/lang/String;)Ljava/lang/String;
move-result-object v7
const-string v9, "gzip"
if-nez v7, :cond_5
const-string v7, "Range"
invoke-virtual {v0, v7}, Lokhttp3/Request;->header(Ljava/lang/String;)Ljava/lang/String;
move-result-object v7
if-nez v7, :cond_5
.line 81
invoke-virtual {v1, v2, v9}, Lokhttp3/Request$Builder;->header(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Request$Builder;
const/4 v8, 0x1
:cond_5
iget-object v2, p0, Lokhttp3/internal/http/BridgeInterceptor;->cookieJar:Lokhttp3/CookieJar;
.line 84
invoke-virtual {v0}, Lokhttp3/Request;->url()Lokhttp3/HttpUrl;
move-result-object v7
invoke-interface {v2, v7}, Lokhttp3/CookieJar;->loadForRequest(Lokhttp3/HttpUrl;)Ljava/util/List;
move-result-object v2
.line 85
invoke-interface {v2}, Ljava/util/List;->isEmpty()Z
move-result v7
if-nez v7, :cond_6
const-string v7, "Cookie"
.line 86
invoke-virtual {p0, v2}, Lokhttp3/internal/http/BridgeInterceptor;->cookieHeader(Ljava/util/List;)Ljava/lang/String;
move-result-object v2
invoke-virtual {v1, v7, v2}, Lokhttp3/Request$Builder;->header(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Request$Builder;
:cond_6
const-string v2, "User-Agent"
.line 89
invoke-virtual {v0, v2}, Lokhttp3/Request;->header(Ljava/lang/String;)Ljava/lang/String;
move-result-object v7
if-nez v7, :cond_7
.line 90
invoke-static {}, Lokhttp3/internal/Version;->userAgent()Ljava/lang/String;
move-result-object v7
invoke-virtual {v1, v2, v7}, Lokhttp3/Request$Builder;->header(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Request$Builder;
.line 93
:cond_7
invoke-virtual {v1}, Lokhttp3/Request$Builder;->build()Lokhttp3/Request;
move-result-object v1
invoke-interface {p1, v1}, Lokhttp3/Interceptor$Chain;->proceed(Lokhttp3/Request;)Lokhttp3/Response;
move-result-object p1
iget-object v1, p0, Lokhttp3/internal/http/BridgeInterceptor;->cookieJar:Lokhttp3/CookieJar;
.line 95
invoke-virtual {v0}, Lokhttp3/Request;->url()Lokhttp3/HttpUrl;
move-result-object v2
invoke-virtual {p1}, Lokhttp3/Response;->headers()Lokhttp3/Headers;
move-result-object v7
invoke-static {v1, v2, v7}, Lokhttp3/internal/http/HttpHeaders;->receiveHeaders(Lokhttp3/CookieJar;Lokhttp3/HttpUrl;Lokhttp3/Headers;)V
.line 97
invoke-virtual {p1}, Lokhttp3/Response;->newBuilder()Lokhttp3/Response$Builder;
move-result-object v1
.line 98
invoke-virtual {v1, v0}, Lokhttp3/Response$Builder;->request(Lokhttp3/Request;)Lokhttp3/Response$Builder;
move-result-object v0
if-eqz v8, :cond_8
const-string v1, "Content-Encoding"
.line 101
invoke-virtual {p1, v1}, Lokhttp3/Response;->header(Ljava/lang/String;)Ljava/lang/String;
move-result-object v2
invoke-virtual {v9, v2}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
move-result v2
if-eqz v2, :cond_8
.line 102
invoke-static {p1}, Lokhttp3/internal/http/HttpHeaders;->hasBody(Lokhttp3/Response;)Z
move-result v2
if-eqz v2, :cond_8
.line 103
new-instance v2, Lokio/GzipSource;
invoke-virtual {p1}, Lokhttp3/Response;->body()Lokhttp3/ResponseBody;
move-result-object v7
invoke-virtual {v7}, Lokhttp3/ResponseBody;->source()Lokio/BufferedSource;
move-result-object v7
invoke-direct {v2, v7}, Lokio/GzipSource;-><init>(Lokio/Source;)V
.line 104
invoke-virtual {p1}, Lokhttp3/Response;->headers()Lokhttp3/Headers;
move-result-object v7
invoke-virtual {v7}, Lokhttp3/Headers;->newBuilder()Lokhttp3/Headers$Builder;
move-result-object v7
.line 105
invoke-virtual {v7, v1}, Lokhttp3/Headers$Builder;->removeAll(Ljava/lang/String;)Lokhttp3/Headers$Builder;
move-result-object v1
.line 106
invoke-virtual {v1, v6}, Lokhttp3/Headers$Builder;->removeAll(Ljava/lang/String;)Lokhttp3/Headers$Builder;
move-result-object v1
.line 107
invoke-virtual {v1}, Lokhttp3/Headers$Builder;->build()Lokhttp3/Headers;
move-result-object v1
.line 108
invoke-virtual {v0, v1}, Lokhttp3/Response$Builder;->headers(Lokhttp3/Headers;)Lokhttp3/Response$Builder;
.line 109
invoke-virtual {p1, v5}, Lokhttp3/Response;->header(Ljava/lang/String;)Ljava/lang/String;
move-result-object p1
.line 110
new-instance v1, Lokhttp3/internal/http/RealResponseBody;
invoke-static {v2}, Lokio/Okio;->buffer(Lokio/Source;)Lokio/BufferedSource;
move-result-object v2
invoke-direct {v1, p1, v3, v4, v2}, Lokhttp3/internal/http/RealResponseBody;-><init>(Ljava/lang/String;JLokio/BufferedSource;)V
invoke-virtual {v0, v1}, Lokhttp3/Response$Builder;->body(Lokhttp3/ResponseBody;)Lokhttp3/Response$Builder;
.line 113
:cond_8
invoke-virtual {v0}, Lokhttp3/Response$Builder;->build()Lokhttp3/Response;
move-result-object p1
return-object p1
.end method

View File

@@ -0,0 +1,473 @@
.class public final Lokhttp3/internal/http/CallServerInterceptor;
.super Ljava/lang/Object;
.source "SourceFile"
# interfaces
.implements Lokhttp3/Interceptor;
# instance fields
.field public final forWebSocket:Z
# direct methods
.method public constructor <init>(Z)V
.locals 0
.line 32
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-boolean p1, p0, Lokhttp3/internal/http/CallServerInterceptor;->forWebSocket:Z
return-void
.end method
# virtual methods
.method public intercept(Lokhttp3/Interceptor$Chain;)Lokhttp3/Response;
.locals 8
.line 37
check-cast p1, Lokhttp3/internal/http/RealInterceptorChain;
.line 38
invoke-virtual {p1}, Lokhttp3/internal/http/RealInterceptorChain;->exchange()Lokhttp3/internal/connection/Exchange;
move-result-object v0
.line 39
invoke-virtual {p1}, Lokhttp3/internal/http/RealInterceptorChain;->request()Lokhttp3/Request;
move-result-object p1
.line 41
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
move-result-wide v1
.line 43
invoke-virtual {v0, p1}, Lokhttp3/internal/connection/Exchange;->writeRequestHeaders(Lokhttp3/Request;)V
.line 47
invoke-virtual {p1}, Lokhttp3/Request;->method()Ljava/lang/String;
move-result-object v3
invoke-static {v3}, Lokhttp3/internal/http/HttpMethod;->permitsRequestBody(Ljava/lang/String;)Z
move-result v3
const/4 v4, 0x0
const/4 v5, 0x0
if-eqz v3, :cond_3
invoke-virtual {p1}, Lokhttp3/Request;->body()Lokhttp3/RequestBody;
move-result-object v3
if-eqz v3, :cond_3
const-string v3, "Expect"
.line 51
invoke-virtual {p1, v3}, Lokhttp3/Request;->header(Ljava/lang/String;)Ljava/lang/String;
move-result-object v3
const-string v6, "100-continue"
invoke-virtual {v6, v3}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
move-result v3
const/4 v6, 0x1
if-eqz v3, :cond_0
.line 52
invoke-virtual {v0}, Lokhttp3/internal/connection/Exchange;->flushRequest()V
.line 54
invoke-virtual {v0}, Lokhttp3/internal/connection/Exchange;->responseHeadersStart()V
.line 55
invoke-virtual {v0, v6}, Lokhttp3/internal/connection/Exchange;->readResponseHeaders(Z)Lokhttp3/Response$Builder;
move-result-object v5
move v3, v6
goto :goto_0
:cond_0
move v3, v4
:goto_0
if-nez v5, :cond_2
.line 59
invoke-virtual {p1}, Lokhttp3/Request;->body()Lokhttp3/RequestBody;
move-result-object v7
invoke-virtual {v7}, Lokhttp3/RequestBody;->isDuplex()Z
move-result v7
if-eqz v7, :cond_1
.line 61
invoke-virtual {v0}, Lokhttp3/internal/connection/Exchange;->flushRequest()V
.line 63
invoke-virtual {v0, p1, v6}, Lokhttp3/internal/connection/Exchange;->createRequestBody(Lokhttp3/Request;Z)Lokio/Sink;
move-result-object v6
.line 62
invoke-static {v6}, Lokio/Okio;->buffer(Lokio/Sink;)Lokio/BufferedSink;
move-result-object v6
.line 64
invoke-virtual {p1}, Lokhttp3/Request;->body()Lokhttp3/RequestBody;
move-result-object v7
invoke-virtual {v7, v6}, Lokhttp3/RequestBody;->writeTo(Lokio/BufferedSink;)V
goto :goto_1
.line 68
:cond_1
invoke-virtual {v0, p1, v4}, Lokhttp3/internal/connection/Exchange;->createRequestBody(Lokhttp3/Request;Z)Lokio/Sink;
move-result-object v6
.line 67
invoke-static {v6}, Lokio/Okio;->buffer(Lokio/Sink;)Lokio/BufferedSink;
move-result-object v6
.line 69
invoke-virtual {p1}, Lokhttp3/Request;->body()Lokhttp3/RequestBody;
move-result-object v7
invoke-virtual {v7, v6}, Lokhttp3/RequestBody;->writeTo(Lokio/BufferedSink;)V
.line 70
invoke-interface {v6}, Lokio/Sink;->close()V
goto :goto_1
.line 73
:cond_2
invoke-virtual {v0}, Lokhttp3/internal/connection/Exchange;->noRequestBody()V
.line 74
invoke-virtual {v0}, Lokhttp3/internal/connection/Exchange;->connection()Lokhttp3/internal/connection/RealConnection;
move-result-object v6
invoke-virtual {v6}, Lokhttp3/internal/connection/RealConnection;->isMultiplexed()Z
move-result v6
if-nez v6, :cond_4
.line 78
invoke-virtual {v0}, Lokhttp3/internal/connection/Exchange;->noNewExchangesOnConnection()V
goto :goto_1
.line 82
:cond_3
invoke-virtual {v0}, Lokhttp3/internal/connection/Exchange;->noRequestBody()V
move v3, v4
.line 85
:cond_4
:goto_1
invoke-virtual {p1}, Lokhttp3/Request;->body()Lokhttp3/RequestBody;
move-result-object v6
if-eqz v6, :cond_5
invoke-virtual {p1}, Lokhttp3/Request;->body()Lokhttp3/RequestBody;
move-result-object v6
invoke-virtual {v6}, Lokhttp3/RequestBody;->isDuplex()Z
move-result v6
if-nez v6, :cond_6
.line 86
:cond_5
invoke-virtual {v0}, Lokhttp3/internal/connection/Exchange;->finishRequest()V
:cond_6
if-nez v3, :cond_7
.line 90
invoke-virtual {v0}, Lokhttp3/internal/connection/Exchange;->responseHeadersStart()V
:cond_7
if-nez v5, :cond_8
.line 94
invoke-virtual {v0, v4}, Lokhttp3/internal/connection/Exchange;->readResponseHeaders(Z)Lokhttp3/Response$Builder;
move-result-object v5
.line 98
:cond_8
invoke-virtual {v5, p1}, Lokhttp3/Response$Builder;->request(Lokhttp3/Request;)Lokhttp3/Response$Builder;
move-result-object v3
.line 99
invoke-virtual {v0}, Lokhttp3/internal/connection/Exchange;->connection()Lokhttp3/internal/connection/RealConnection;
move-result-object v5
invoke-virtual {v5}, Lokhttp3/internal/connection/RealConnection;->handshake()Lokhttp3/Handshake;
move-result-object v5
invoke-virtual {v3, v5}, Lokhttp3/Response$Builder;->handshake(Lokhttp3/Handshake;)Lokhttp3/Response$Builder;
move-result-object v3
.line 100
invoke-virtual {v3, v1, v2}, Lokhttp3/Response$Builder;->sentRequestAtMillis(J)Lokhttp3/Response$Builder;
move-result-object v3
.line 101
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
move-result-wide v5
invoke-virtual {v3, v5, v6}, Lokhttp3/Response$Builder;->receivedResponseAtMillis(J)Lokhttp3/Response$Builder;
move-result-object v3
.line 102
invoke-virtual {v3}, Lokhttp3/Response$Builder;->build()Lokhttp3/Response;
move-result-object v3
.line 104
invoke-virtual {v3}, Lokhttp3/Response;->code()I
move-result v5
const/16 v6, 0x64
if-ne v5, v6, :cond_9
.line 108
invoke-virtual {v0, v4}, Lokhttp3/internal/connection/Exchange;->readResponseHeaders(Z)Lokhttp3/Response$Builder;
move-result-object v3
.line 109
invoke-virtual {v3, p1}, Lokhttp3/Response$Builder;->request(Lokhttp3/Request;)Lokhttp3/Response$Builder;
move-result-object p1
.line 110
invoke-virtual {v0}, Lokhttp3/internal/connection/Exchange;->connection()Lokhttp3/internal/connection/RealConnection;
move-result-object v3
invoke-virtual {v3}, Lokhttp3/internal/connection/RealConnection;->handshake()Lokhttp3/Handshake;
move-result-object v3
invoke-virtual {p1, v3}, Lokhttp3/Response$Builder;->handshake(Lokhttp3/Handshake;)Lokhttp3/Response$Builder;
move-result-object p1
.line 111
invoke-virtual {p1, v1, v2}, Lokhttp3/Response$Builder;->sentRequestAtMillis(J)Lokhttp3/Response$Builder;
move-result-object p1
.line 112
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
move-result-wide v1
invoke-virtual {p1, v1, v2}, Lokhttp3/Response$Builder;->receivedResponseAtMillis(J)Lokhttp3/Response$Builder;
move-result-object p1
.line 113
invoke-virtual {p1}, Lokhttp3/Response$Builder;->build()Lokhttp3/Response;
move-result-object v3
.line 115
invoke-virtual {v3}, Lokhttp3/Response;->code()I
move-result v5
.line 118
:cond_9
invoke-virtual {v0, v3}, Lokhttp3/internal/connection/Exchange;->responseHeadersEnd(Lokhttp3/Response;)V
iget-boolean p1, p0, Lokhttp3/internal/http/CallServerInterceptor;->forWebSocket:Z
if-eqz p1, :cond_a
const/16 p1, 0x65
if-ne v5, p1, :cond_a
.line 122
invoke-virtual {v3}, Lokhttp3/Response;->newBuilder()Lokhttp3/Response$Builder;
move-result-object p1
sget-object v1, Lokhttp3/internal/Util;->EMPTY_RESPONSE:Lokhttp3/ResponseBody;
.line 123
invoke-virtual {p1, v1}, Lokhttp3/Response$Builder;->body(Lokhttp3/ResponseBody;)Lokhttp3/Response$Builder;
move-result-object p1
.line 124
invoke-virtual {p1}, Lokhttp3/Response$Builder;->build()Lokhttp3/Response;
move-result-object p1
goto :goto_2
.line 126
:cond_a
invoke-virtual {v3}, Lokhttp3/Response;->newBuilder()Lokhttp3/Response$Builder;
move-result-object p1
.line 127
invoke-virtual {v0, v3}, Lokhttp3/internal/connection/Exchange;->openResponseBody(Lokhttp3/Response;)Lokhttp3/ResponseBody;
move-result-object v1
invoke-virtual {p1, v1}, Lokhttp3/Response$Builder;->body(Lokhttp3/ResponseBody;)Lokhttp3/Response$Builder;
move-result-object p1
.line 128
invoke-virtual {p1}, Lokhttp3/Response$Builder;->build()Lokhttp3/Response;
move-result-object p1
.line 131
:goto_2
invoke-virtual {p1}, Lokhttp3/Response;->request()Lokhttp3/Request;
move-result-object v1
const-string v2, "Connection"
invoke-virtual {v1, v2}, Lokhttp3/Request;->header(Ljava/lang/String;)Ljava/lang/String;
move-result-object v1
const-string v3, "close"
invoke-virtual {v3, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
move-result v1
if-nez v1, :cond_b
.line 132
invoke-virtual {p1, v2}, Lokhttp3/Response;->header(Ljava/lang/String;)Ljava/lang/String;
move-result-object v1
invoke-virtual {v3, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
move-result v1
if-eqz v1, :cond_c
.line 133
:cond_b
invoke-virtual {v0}, Lokhttp3/internal/connection/Exchange;->noNewExchangesOnConnection()V
:cond_c
const/16 v0, 0xcc
if-eq v5, v0, :cond_d
const/16 v0, 0xcd
if-ne v5, v0, :cond_e
.line 136
:cond_d
invoke-virtual {p1}, Lokhttp3/Response;->body()Lokhttp3/ResponseBody;
move-result-object v0
invoke-virtual {v0}, Lokhttp3/ResponseBody;->contentLength()J
move-result-wide v0
const-wide/16 v2, 0x0
cmp-long v0, v0, v2
if-gtz v0, :cond_f
:cond_e
return-object p1
.line 137
:cond_f
new-instance v0, Ljava/net/ProtocolException;
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "HTTP "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1, v5}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
const-string v2, " had non-zero Content-Length: "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
.line 138
invoke-virtual {p1}, Lokhttp3/Response;->body()Lokhttp3/ResponseBody;
move-result-object p1
invoke-virtual {p1}, Lokhttp3/ResponseBody;->contentLength()J
move-result-wide v2
invoke-virtual {v1, v2, v3}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {v0, p1}, Ljava/net/ProtocolException;-><init>(Ljava/lang/String;)V
throw v0
.end method

View File

@@ -0,0 +1,32 @@
.class public interface abstract Lokhttp3/internal/http/ExchangeCodec;
.super Ljava/lang/Object;
.source "SourceFile"
# virtual methods
.method public abstract cancel()V
.end method
.method public abstract connection()Lokhttp3/internal/connection/RealConnection;
.end method
.method public abstract createRequestBody(Lokhttp3/Request;J)Lokio/Sink;
.end method
.method public abstract finishRequest()V
.end method
.method public abstract flushRequest()V
.end method
.method public abstract openResponseBodySource(Lokhttp3/Response;)Lokio/Source;
.end method
.method public abstract readResponseHeaders(Z)Lokhttp3/Response$Builder;
.end method
.method public abstract reportedContentLength(Lokhttp3/Response;)J
.end method
.method public abstract writeRequestHeaders(Lokhttp3/Request;)V
.end method

View File

@@ -0,0 +1,63 @@
.class public Lokhttp3/internal/http/HttpDate$1;
.super Ljava/lang/ThreadLocal;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lokhttp3/internal/http/HttpDate;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1
name = null
.end annotation
# direct methods
.method public constructor <init>()V
.locals 0
.line 38
invoke-direct {p0}, Ljava/lang/ThreadLocal;-><init>()V
return-void
.end method
# virtual methods
.method public bridge synthetic initialValue()Ljava/lang/Object;
.locals 1
.line 38
invoke-virtual {p0}, Lokhttp3/internal/http/HttpDate$1;->initialValue()Ljava/text/DateFormat;
move-result-object v0
return-object v0
.end method
.method public initialValue()Ljava/text/DateFormat;
.locals 3
.line 41
new-instance v0, Ljava/text/SimpleDateFormat;
const-string v1, "EEE, dd MMM yyyy HH:mm:ss \'GMT\'"
sget-object v2, Ljava/util/Locale;->US:Ljava/util/Locale;
invoke-direct {v0, v1, v2}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;Ljava/util/Locale;)V
const/4 v1, 0x0
.line 42
invoke-virtual {v0, v1}, Ljava/text/DateFormat;->setLenient(Z)V
.line 43
sget-object v1, Lokhttp3/internal/Util;->UTC:Ljava/util/TimeZone;
invoke-virtual {v0, v1}, Ljava/text/DateFormat;->setTimeZone(Ljava/util/TimeZone;)V
return-object v0
.end method

View File

@@ -0,0 +1,225 @@
.class public abstract Lokhttp3/internal/http/HttpDate;
.super Ljava/lang/Object;
.source "SourceFile"
# static fields
.field public static final BROWSER_COMPATIBLE_DATE_FORMATS:[Ljava/text/DateFormat;
.field public static final BROWSER_COMPATIBLE_DATE_FORMAT_STRINGS:[Ljava/lang/String;
.field public static final STANDARD_DATE_FORMAT:Ljava/lang/ThreadLocal;
# direct methods
.method static constructor <clinit>()V
.locals 16
.line 37
new-instance v0, Lokhttp3/internal/http/HttpDate$1;
invoke-direct {v0}, Lokhttp3/internal/http/HttpDate$1;-><init>()V
sput-object v0, Lokhttp3/internal/http/HttpDate;->STANDARD_DATE_FORMAT:Ljava/lang/ThreadLocal;
const-string v1, "EEE, dd MMM yyyy HH:mm:ss zzz"
const-string v2, "EEEE, dd-MMM-yy HH:mm:ss zzz"
const-string v3, "EEE MMM d HH:mm:ss yyyy"
const-string v4, "EEE, dd-MMM-yyyy HH:mm:ss z"
const-string v5, "EEE, dd-MMM-yyyy HH-mm-ss z"
const-string v6, "EEE, dd MMM yy HH:mm:ss z"
const-string v7, "EEE dd-MMM-yyyy HH:mm:ss z"
const-string v8, "EEE dd MMM yyyy HH:mm:ss z"
const-string v9, "EEE dd-MMM-yyyy HH-mm-ss z"
const-string v10, "EEE dd-MMM-yy HH:mm:ss z"
const-string v11, "EEE dd MMM yy HH:mm:ss z"
const-string v12, "EEE,dd-MMM-yy HH:mm:ss z"
const-string v13, "EEE,dd-MMM-yyyy HH:mm:ss z"
const-string v14, "EEE, dd-MM-yyyy HH:mm:ss z"
const-string v15, "EEE MMM d yyyy HH:mm:ss z"
filled-new-array/range {v1 .. v15}, [Ljava/lang/String;
move-result-object v0
sput-object v0, Lokhttp3/internal/http/HttpDate;->BROWSER_COMPATIBLE_DATE_FORMAT_STRINGS:[Ljava/lang/String;
array-length v0, v0
.line 71
new-array v0, v0, [Ljava/text/DateFormat;
sput-object v0, Lokhttp3/internal/http/HttpDate;->BROWSER_COMPATIBLE_DATE_FORMATS:[Ljava/text/DateFormat;
return-void
.end method
.method public static format(Ljava/util/Date;)Ljava/lang/String;
.locals 1
sget-object v0, Lokhttp3/internal/http/HttpDate;->STANDARD_DATE_FORMAT:Ljava/lang/ThreadLocal;
.line 114
invoke-virtual {v0}, Ljava/lang/ThreadLocal;->get()Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/text/DateFormat;
invoke-virtual {v0, p0}, Ljava/text/DateFormat;->format(Ljava/util/Date;)Ljava/lang/String;
move-result-object p0
return-object p0
.end method
.method public static parse(Ljava/lang/String;)Ljava/util/Date;
.locals 10
.line 76
invoke-virtual {p0}, Ljava/lang/String;->length()I
move-result v0
const/4 v1, 0x0
if-nez v0, :cond_0
return-object v1
.line 80
:cond_0
new-instance v0, Ljava/text/ParsePosition;
const/4 v2, 0x0
invoke-direct {v0, v2}, Ljava/text/ParsePosition;-><init>(I)V
sget-object v3, Lokhttp3/internal/http/HttpDate;->STANDARD_DATE_FORMAT:Ljava/lang/ThreadLocal;
.line 81
invoke-virtual {v3}, Ljava/lang/ThreadLocal;->get()Ljava/lang/Object;
move-result-object v3
check-cast v3, Ljava/text/DateFormat;
invoke-virtual {v3, p0, v0}, Ljava/text/DateFormat;->parse(Ljava/lang/String;Ljava/text/ParsePosition;)Ljava/util/Date;
move-result-object v3
.line 82
invoke-virtual {v0}, Ljava/text/ParsePosition;->getIndex()I
move-result v4
invoke-virtual {p0}, Ljava/lang/String;->length()I
move-result v5
if-ne v4, v5, :cond_1
return-object v3
:cond_1
sget-object v3, Lokhttp3/internal/http/HttpDate;->BROWSER_COMPATIBLE_DATE_FORMAT_STRINGS:[Ljava/lang/String;
.line 87
monitor-enter v3
.line 88
:try_start_0
array-length v4, v3
move v5, v2
:goto_0
if-ge v5, v4, :cond_4
sget-object v6, Lokhttp3/internal/http/HttpDate;->BROWSER_COMPATIBLE_DATE_FORMATS:[Ljava/text/DateFormat;
.line 89
aget-object v7, v6, v5
if-nez v7, :cond_2
.line 91
new-instance v7, Ljava/text/SimpleDateFormat;
sget-object v8, Lokhttp3/internal/http/HttpDate;->BROWSER_COMPATIBLE_DATE_FORMAT_STRINGS:[Ljava/lang/String;
aget-object v8, v8, v5
sget-object v9, Ljava/util/Locale;->US:Ljava/util/Locale;
invoke-direct {v7, v8, v9}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;Ljava/util/Locale;)V
.line 94
sget-object v8, Lokhttp3/internal/Util;->UTC:Ljava/util/TimeZone;
invoke-virtual {v7, v8}, Ljava/text/DateFormat;->setTimeZone(Ljava/util/TimeZone;)V
.line 95
aput-object v7, v6, v5
goto :goto_1
:catchall_0
move-exception p0
goto :goto_2
.line 97
:cond_2
:goto_1
invoke-virtual {v0, v2}, Ljava/text/ParsePosition;->setIndex(I)V
.line 98
invoke-virtual {v7, p0, v0}, Ljava/text/DateFormat;->parse(Ljava/lang/String;Ljava/text/ParsePosition;)Ljava/util/Date;
move-result-object v6
.line 99
invoke-virtual {v0}, Ljava/text/ParsePosition;->getIndex()I
move-result v7
if-eqz v7, :cond_3
.line 105
monitor-exit v3
return-object v6
:cond_3
add-int/lit8 v5, v5, 0x1
goto :goto_0
.line 108
:cond_4
monitor-exit v3
return-object v1
:goto_2
monitor-exit v3
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
throw p0
.end method

View File

@@ -0,0 +1,609 @@
.class public abstract Lokhttp3/internal/http/HttpHeaders;
.super Ljava/lang/Object;
.source "SourceFile"
# static fields
.field public static final QUOTED_STRING_DELIMITERS:Lokio/ByteString;
.field public static final TOKEN_DELIMITERS:Lokio/ByteString;
# direct methods
.method static constructor <clinit>()V
.locals 1
const-string v0, "\"\\"
.line 45
invoke-static {v0}, Lokio/ByteString;->encodeUtf8(Ljava/lang/String;)Lokio/ByteString;
move-result-object v0
sput-object v0, Lokhttp3/internal/http/HttpHeaders;->QUOTED_STRING_DELIMITERS:Lokio/ByteString;
const-string v0, "\t ,="
.line 46
invoke-static {v0}, Lokio/ByteString;->encodeUtf8(Ljava/lang/String;)Lokio/ByteString;
move-result-object v0
sput-object v0, Lokhttp3/internal/http/HttpHeaders;->TOKEN_DELIMITERS:Lokio/ByteString;
return-void
.end method
.method public static contentLength(Lokhttp3/Headers;)J
.locals 2
const-string v0, "Content-Length"
.line 56
invoke-virtual {p0, v0}, Lokhttp3/Headers;->get(Ljava/lang/String;)Ljava/lang/String;
move-result-object p0
invoke-static {p0}, Lokhttp3/internal/http/HttpHeaders;->stringToLong(Ljava/lang/String;)J
move-result-wide v0
return-wide v0
.end method
.method public static contentLength(Lokhttp3/Response;)J
.locals 2
.line 52
invoke-virtual {p0}, Lokhttp3/Response;->headers()Lokhttp3/Headers;
move-result-object p0
invoke-static {p0}, Lokhttp3/internal/http/HttpHeaders;->contentLength(Lokhttp3/Headers;)J
move-result-wide v0
return-wide v0
.end method
.method public static hasBody(Lokhttp3/Response;)Z
.locals 8
.line 325
invoke-virtual {p0}, Lokhttp3/Response;->request()Lokhttp3/Request;
move-result-object v0
invoke-virtual {v0}, Lokhttp3/Request;->method()Ljava/lang/String;
move-result-object v0
const-string v1, "HEAD"
invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
const/4 v1, 0x0
if-eqz v0, :cond_0
return v1
.line 329
:cond_0
invoke-virtual {p0}, Lokhttp3/Response;->code()I
move-result v0
const/16 v2, 0x64
const/4 v3, 0x1
if-lt v0, v2, :cond_1
const/16 v2, 0xc8
if-lt v0, v2, :cond_2
:cond_1
const/16 v2, 0xcc
if-eq v0, v2, :cond_2
const/16 v2, 0x130
if-eq v0, v2, :cond_2
return v3
.line 338
:cond_2
invoke-static {p0}, Lokhttp3/internal/http/HttpHeaders;->contentLength(Lokhttp3/Response;)J
move-result-wide v4
const-wide/16 v6, -0x1
cmp-long v0, v4, v6
if-nez v0, :cond_4
const-string v0, "Transfer-Encoding"
.line 339
invoke-virtual {p0, v0}, Lokhttp3/Response;->header(Ljava/lang/String;)Ljava/lang/String;
move-result-object p0
const-string v0, "chunked"
invoke-virtual {v0, p0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
move-result p0
if-eqz p0, :cond_3
goto :goto_0
:cond_3
return v1
:cond_4
:goto_0
return v3
.end method
.method public static hasVaryAll(Lokhttp3/Headers;)Z
.locals 1
.line 91
invoke-static {p0}, Lokhttp3/internal/http/HttpHeaders;->varyFields(Lokhttp3/Headers;)Ljava/util/Set;
move-result-object p0
const-string v0, "*"
invoke-interface {p0, v0}, Ljava/util/Set;->contains(Ljava/lang/Object;)Z
move-result p0
return p0
.end method
.method public static hasVaryAll(Lokhttp3/Response;)Z
.locals 0
.line 84
invoke-virtual {p0}, Lokhttp3/Response;->headers()Lokhttp3/Headers;
move-result-object p0
invoke-static {p0}, Lokhttp3/internal/http/HttpHeaders;->hasVaryAll(Lokhttp3/Headers;)Z
move-result p0
return p0
.end method
.method public static parseSeconds(Ljava/lang/String;I)I
.locals 2
.line 379
:try_start_0
invoke-static {p0}, Ljava/lang/Long;->parseLong(Ljava/lang/String;)J
move-result-wide p0
:try_end_0
.catch Ljava/lang/NumberFormatException; {:try_start_0 .. :try_end_0} :catch_0
const-wide/32 v0, 0x7fffffff
cmp-long v0, p0, v0
if-lez v0, :cond_0
const p0, 0x7fffffff
return p0
:cond_0
const-wide/16 v0, 0x0
cmp-long v0, p0, v0
if-gez v0, :cond_1
const/4 p0, 0x0
return p0
:cond_1
long-to-int p0, p0
return p0
:catch_0
return p1
.end method
.method public static receiveHeaders(Lokhttp3/CookieJar;Lokhttp3/HttpUrl;Lokhttp3/Headers;)V
.locals 1
.line 314
sget-object v0, Lokhttp3/CookieJar;->NO_COOKIES:Lokhttp3/CookieJar;
if-ne p0, v0, :cond_0
return-void
.line 316
:cond_0
invoke-static {p1, p2}, Lokhttp3/Cookie;->parseAll(Lokhttp3/HttpUrl;Lokhttp3/Headers;)Ljava/util/List;
move-result-object p2
.line 317
invoke-interface {p2}, Ljava/util/List;->isEmpty()Z
move-result v0
if-eqz v0, :cond_1
return-void
.line 319
:cond_1
invoke-interface {p0, p1, p2}, Lokhttp3/CookieJar;->saveFromResponse(Lokhttp3/HttpUrl;Ljava/util/List;)V
return-void
.end method
.method public static skipUntil(Ljava/lang/String;ILjava/lang/String;)I
.locals 2
.line 351
:goto_0
invoke-virtual {p0}, Ljava/lang/String;->length()I
move-result v0
if-ge p1, v0, :cond_1
.line 352
invoke-virtual {p0, p1}, Ljava/lang/String;->charAt(I)C
move-result v0
invoke-virtual {p2, v0}, Ljava/lang/String;->indexOf(I)I
move-result v0
const/4 v1, -0x1
if-eq v0, v1, :cond_0
goto :goto_1
:cond_0
add-int/lit8 p1, p1, 0x1
goto :goto_0
:cond_1
:goto_1
return p1
.end method
.method public static skipWhitespace(Ljava/lang/String;I)I
.locals 2
.line 364
:goto_0
invoke-virtual {p0}, Ljava/lang/String;->length()I
move-result v0
if-ge p1, v0, :cond_1
.line 365
invoke-virtual {p0, p1}, Ljava/lang/String;->charAt(I)C
move-result v0
const/16 v1, 0x20
if-eq v0, v1, :cond_0
const/16 v1, 0x9
if-eq v0, v1, :cond_0
goto :goto_1
:cond_0
add-int/lit8 p1, p1, 0x1
goto :goto_0
:cond_1
:goto_1
return p1
.end method
.method public static stringToLong(Ljava/lang/String;)J
.locals 2
const-wide/16 v0, -0x1
if-nez p0, :cond_0
return-wide v0
.line 62
:cond_0
:try_start_0
invoke-static {p0}, Ljava/lang/Long;->parseLong(Ljava/lang/String;)J
move-result-wide v0
:try_end_0
.catch Ljava/lang/NumberFormatException; {:try_start_0 .. :try_end_0} :catch_0
:catch_0
return-wide v0
.end method
.method public static varyFields(Lokhttp3/Headers;)Ljava/util/Set;
.locals 8
.line 102
invoke-static {}, Ljava/util/Collections;->emptySet()Ljava/util/Set;
move-result-object v0
.line 103
invoke-virtual {p0}, Lokhttp3/Headers;->size()I
move-result v1
const/4 v2, 0x0
move v3, v2
:goto_0
if-ge v3, v1, :cond_3
const-string v4, "Vary"
.line 104
invoke-virtual {p0, v3}, Lokhttp3/Headers;->name(I)Ljava/lang/String;
move-result-object v5
invoke-virtual {v4, v5}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
move-result v4
if-nez v4, :cond_0
goto :goto_2
.line 106
:cond_0
invoke-virtual {p0, v3}, Lokhttp3/Headers;->value(I)Ljava/lang/String;
move-result-object v4
.line 107
invoke-interface {v0}, Ljava/util/Set;->isEmpty()Z
move-result v5
if-eqz v5, :cond_1
.line 108
new-instance v0, Ljava/util/TreeSet;
sget-object v5, Ljava/lang/String;->CASE_INSENSITIVE_ORDER:Ljava/util/Comparator;
invoke-direct {v0, v5}, Ljava/util/TreeSet;-><init>(Ljava/util/Comparator;)V
:cond_1
const-string v5, ","
.line 110
invoke-virtual {v4, v5}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;
move-result-object v4
array-length v5, v4
move v6, v2
:goto_1
if-ge v6, v5, :cond_2
aget-object v7, v4, v6
.line 111
invoke-virtual {v7}, Ljava/lang/String;->trim()Ljava/lang/String;
move-result-object v7
invoke-interface {v0, v7}, Ljava/util/Set;->add(Ljava/lang/Object;)Z
add-int/lit8 v6, v6, 0x1
goto :goto_1
:cond_2
:goto_2
add-int/lit8 v3, v3, 0x1
goto :goto_0
:cond_3
return-object v0
.end method
.method public static varyFields(Lokhttp3/Response;)Ljava/util/Set;
.locals 0
.line 95
invoke-virtual {p0}, Lokhttp3/Response;->headers()Lokhttp3/Headers;
move-result-object p0
invoke-static {p0}, Lokhttp3/internal/http/HttpHeaders;->varyFields(Lokhttp3/Headers;)Ljava/util/Set;
move-result-object p0
return-object p0
.end method
.method public static varyHeaders(Lokhttp3/Headers;Lokhttp3/Headers;)Lokhttp3/Headers;
.locals 5
.line 135
invoke-static {p1}, Lokhttp3/internal/http/HttpHeaders;->varyFields(Lokhttp3/Headers;)Ljava/util/Set;
move-result-object p1
.line 136
invoke-interface {p1}, Ljava/util/Set;->isEmpty()Z
move-result v0
if-eqz v0, :cond_0
sget-object p0, Lokhttp3/internal/Util;->EMPTY_HEADERS:Lokhttp3/Headers;
return-object p0
.line 138
:cond_0
new-instance v0, Lokhttp3/Headers$Builder;
invoke-direct {v0}, Lokhttp3/Headers$Builder;-><init>()V
.line 139
invoke-virtual {p0}, Lokhttp3/Headers;->size()I
move-result v1
const/4 v2, 0x0
:goto_0
if-ge v2, v1, :cond_2
.line 140
invoke-virtual {p0, v2}, Lokhttp3/Headers;->name(I)Ljava/lang/String;
move-result-object v3
.line 141
invoke-interface {p1, v3}, Ljava/util/Set;->contains(Ljava/lang/Object;)Z
move-result v4
if-eqz v4, :cond_1
.line 142
invoke-virtual {p0, v2}, Lokhttp3/Headers;->value(I)Ljava/lang/String;
move-result-object v4
invoke-virtual {v0, v3, v4}, Lokhttp3/Headers$Builder;->add(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Headers$Builder;
:cond_1
add-int/lit8 v2, v2, 0x1
goto :goto_0
.line 145
:cond_2
invoke-virtual {v0}, Lokhttp3/Headers$Builder;->build()Lokhttp3/Headers;
move-result-object p0
return-object p0
.end method
.method public static varyHeaders(Lokhttp3/Response;)Lokhttp3/Headers;
.locals 1
.line 125
invoke-virtual {p0}, Lokhttp3/Response;->networkResponse()Lokhttp3/Response;
move-result-object v0
invoke-virtual {v0}, Lokhttp3/Response;->request()Lokhttp3/Request;
move-result-object v0
invoke-virtual {v0}, Lokhttp3/Request;->headers()Lokhttp3/Headers;
move-result-object v0
.line 126
invoke-virtual {p0}, Lokhttp3/Response;->headers()Lokhttp3/Headers;
move-result-object p0
.line 127
invoke-static {v0, p0}, Lokhttp3/internal/http/HttpHeaders;->varyHeaders(Lokhttp3/Headers;Lokhttp3/Headers;)Lokhttp3/Headers;
move-result-object p0
return-object p0
.end method
.method public static varyMatches(Lokhttp3/Response;Lokhttp3/Headers;Lokhttp3/Request;)Z
.locals 2
.line 74
invoke-static {p0}, Lokhttp3/internal/http/HttpHeaders;->varyFields(Lokhttp3/Response;)Ljava/util/Set;
move-result-object p0
invoke-interface {p0}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
move-result-object p0
:cond_0
invoke-interface {p0}, Ljava/util/Iterator;->hasNext()Z
move-result v0
if-eqz v0, :cond_1
invoke-interface {p0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/lang/String;
.line 75
invoke-virtual {p1, v0}, Lokhttp3/Headers;->values(Ljava/lang/String;)Ljava/util/List;
move-result-object v1
invoke-virtual {p2, v0}, Lokhttp3/Request;->headers(Ljava/lang/String;)Ljava/util/List;
move-result-object v0
invoke-static {v1, v0}, Ljava/util/Objects;->equals(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v0
if-nez v0, :cond_0
const/4 p0, 0x0
return p0
:cond_1
const/4 p0, 0x1
return p0
.end method

View File

@@ -0,0 +1,190 @@
.class public abstract Lokhttp3/internal/http/HttpMethod;
.super Ljava/lang/Object;
.source "SourceFile"
# direct methods
.method public static invalidatesCache(Ljava/lang/String;)Z
.locals 1
const-string v0, "POST"
.line 20
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-nez v0, :cond_1
const-string v0, "PATCH"
.line 21
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-nez v0, :cond_1
const-string v0, "PUT"
.line 22
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-nez v0, :cond_1
const-string v0, "DELETE"
.line 23
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-nez v0, :cond_1
const-string v0, "MOVE"
.line 24
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result p0
if-eqz p0, :cond_0
goto :goto_0
:cond_0
const/4 p0, 0x0
goto :goto_1
:cond_1
:goto_0
const/4 p0, 0x1
:goto_1
return p0
.end method
.method public static permitsRequestBody(Ljava/lang/String;)Z
.locals 1
const-string v0, "GET"
.line 36
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-nez v0, :cond_0
const-string v0, "HEAD"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result p0
if-nez p0, :cond_0
const/4 p0, 0x1
goto :goto_0
:cond_0
const/4 p0, 0x0
:goto_0
return p0
.end method
.method public static redirectsToGet(Ljava/lang/String;)Z
.locals 1
const-string v0, "PROPFIND"
.line 45
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result p0
xor-int/lit8 p0, p0, 0x1
return p0
.end method
.method public static redirectsWithBody(Ljava/lang/String;)Z
.locals 1
const-string v0, "PROPFIND"
.line 40
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result p0
return p0
.end method
.method public static requiresRequestBody(Ljava/lang/String;)Z
.locals 1
const-string v0, "POST"
.line 28
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-nez v0, :cond_1
const-string v0, "PUT"
.line 29
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-nez v0, :cond_1
const-string v0, "PATCH"
.line 30
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-nez v0, :cond_1
const-string v0, "PROPPATCH"
.line 31
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-nez v0, :cond_1
const-string v0, "REPORT"
.line 32
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result p0
if-eqz p0, :cond_0
goto :goto_0
:cond_0
const/4 p0, 0x0
goto :goto_1
:cond_1
:goto_0
const/4 p0, 0x1
:goto_1
return p0
.end method

View File

@@ -0,0 +1,419 @@
.class public final Lokhttp3/internal/http/RealInterceptorChain;
.super Ljava/lang/Object;
.source "SourceFile"
# interfaces
.implements Lokhttp3/Interceptor$Chain;
# instance fields
.field public final call:Lokhttp3/Call;
.field public calls:I
.field public final connectTimeout:I
.field public final exchange:Lokhttp3/internal/connection/Exchange;
.field public final index:I
.field public final interceptors:Ljava/util/List;
.field public final readTimeout:I
.field public final request:Lokhttp3/Request;
.field public final transmitter:Lokhttp3/internal/connection/Transmitter;
.field public final writeTimeout:I
# direct methods
.method public constructor <init>(Ljava/util/List;Lokhttp3/internal/connection/Transmitter;Lokhttp3/internal/connection/Exchange;ILokhttp3/Request;Lokhttp3/Call;III)V
.locals 0
.line 53
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Lokhttp3/internal/http/RealInterceptorChain;->interceptors:Ljava/util/List;
iput-object p2, p0, Lokhttp3/internal/http/RealInterceptorChain;->transmitter:Lokhttp3/internal/connection/Transmitter;
iput-object p3, p0, Lokhttp3/internal/http/RealInterceptorChain;->exchange:Lokhttp3/internal/connection/Exchange;
iput p4, p0, Lokhttp3/internal/http/RealInterceptorChain;->index:I
iput-object p5, p0, Lokhttp3/internal/http/RealInterceptorChain;->request:Lokhttp3/Request;
iput-object p6, p0, Lokhttp3/internal/http/RealInterceptorChain;->call:Lokhttp3/Call;
iput p7, p0, Lokhttp3/internal/http/RealInterceptorChain;->connectTimeout:I
iput p8, p0, Lokhttp3/internal/http/RealInterceptorChain;->readTimeout:I
iput p9, p0, Lokhttp3/internal/http/RealInterceptorChain;->writeTimeout:I
return-void
.end method
# virtual methods
.method public connectTimeoutMillis()I
.locals 1
iget v0, p0, Lokhttp3/internal/http/RealInterceptorChain;->connectTimeout:I
return v0
.end method
.method public exchange()Lokhttp3/internal/connection/Exchange;
.locals 1
iget-object v0, p0, Lokhttp3/internal/http/RealInterceptorChain;->exchange:Lokhttp3/internal/connection/Exchange;
if-eqz v0, :cond_0
return-object v0
.line 104
:cond_0
new-instance v0, Ljava/lang/IllegalStateException;
invoke-direct {v0}, Ljava/lang/IllegalStateException;-><init>()V
throw v0
.end method
.method public proceed(Lokhttp3/Request;)Lokhttp3/Response;
.locals 2
iget-object v0, p0, Lokhttp3/internal/http/RealInterceptorChain;->transmitter:Lokhttp3/internal/connection/Transmitter;
iget-object v1, p0, Lokhttp3/internal/http/RealInterceptorChain;->exchange:Lokhttp3/internal/connection/Exchange;
.line 117
invoke-virtual {p0, p1, v0, v1}, Lokhttp3/internal/http/RealInterceptorChain;->proceed(Lokhttp3/Request;Lokhttp3/internal/connection/Transmitter;Lokhttp3/internal/connection/Exchange;)Lokhttp3/Response;
move-result-object p1
return-object p1
.end method
.method public proceed(Lokhttp3/Request;Lokhttp3/internal/connection/Transmitter;Lokhttp3/internal/connection/Exchange;)Lokhttp3/Response;
.locals 15
move-object v0, p0
iget v1, v0, Lokhttp3/internal/http/RealInterceptorChain;->index:I
iget-object v2, v0, Lokhttp3/internal/http/RealInterceptorChain;->interceptors:Ljava/util/List;
.line 122
invoke-interface {v2}, Ljava/util/List;->size()I
move-result v2
if-ge v1, v2, :cond_8
iget v1, v0, Lokhttp3/internal/http/RealInterceptorChain;->calls:I
const/4 v2, 0x1
add-int/2addr v1, v2
iput v1, v0, Lokhttp3/internal/http/RealInterceptorChain;->calls:I
iget-object v1, v0, Lokhttp3/internal/http/RealInterceptorChain;->exchange:Lokhttp3/internal/connection/Exchange;
const-string v3, "network interceptor "
if-eqz v1, :cond_1
.line 127
invoke-virtual {v1}, Lokhttp3/internal/connection/Exchange;->connection()Lokhttp3/internal/connection/RealConnection;
move-result-object v1
invoke-virtual/range {p1 .. p1}, Lokhttp3/Request;->url()Lokhttp3/HttpUrl;
move-result-object v4
invoke-virtual {v1, v4}, Lokhttp3/internal/connection/RealConnection;->supportsUrl(Lokhttp3/HttpUrl;)Z
move-result v1
if-eqz v1, :cond_0
goto :goto_0
.line 128
:cond_0
new-instance v1, Ljava/lang/IllegalStateException;
new-instance v4, Ljava/lang/StringBuilder;
invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {v4, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object v3, v0, Lokhttp3/internal/http/RealInterceptorChain;->interceptors:Ljava/util/List;
iget v5, v0, Lokhttp3/internal/http/RealInterceptorChain;->index:I
sub-int/2addr v5, v2
invoke-interface {v3, v5}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v2
invoke-virtual {v4, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
const-string v2, " must retain the same host and port"
invoke-virtual {v4, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
invoke-direct {v1, v2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v1
:cond_1
:goto_0
iget-object v1, v0, Lokhttp3/internal/http/RealInterceptorChain;->exchange:Lokhttp3/internal/connection/Exchange;
const-string v4, " must call proceed() exactly once"
if-eqz v1, :cond_3
iget v1, v0, Lokhttp3/internal/http/RealInterceptorChain;->calls:I
if-gt v1, v2, :cond_2
goto :goto_1
.line 134
:cond_2
new-instance v1, Ljava/lang/IllegalStateException;
new-instance v5, Ljava/lang/StringBuilder;
invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {v5, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object v3, v0, Lokhttp3/internal/http/RealInterceptorChain;->interceptors:Ljava/util/List;
iget v6, v0, Lokhttp3/internal/http/RealInterceptorChain;->index:I
sub-int/2addr v6, v2
invoke-interface {v3, v6}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v2
invoke-virtual {v5, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invoke-virtual {v5, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
invoke-direct {v1, v2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v1
.line 139
:cond_3
:goto_1
new-instance v1, Lokhttp3/internal/http/RealInterceptorChain;
iget-object v6, v0, Lokhttp3/internal/http/RealInterceptorChain;->interceptors:Ljava/util/List;
iget v5, v0, Lokhttp3/internal/http/RealInterceptorChain;->index:I
add-int/lit8 v9, v5, 0x1
iget-object v11, v0, Lokhttp3/internal/http/RealInterceptorChain;->call:Lokhttp3/Call;
iget v12, v0, Lokhttp3/internal/http/RealInterceptorChain;->connectTimeout:I
iget v13, v0, Lokhttp3/internal/http/RealInterceptorChain;->readTimeout:I
iget v14, v0, Lokhttp3/internal/http/RealInterceptorChain;->writeTimeout:I
move-object v5, v1
move-object/from16 v7, p2
move-object/from16 v8, p3
move-object/from16 v10, p1
invoke-direct/range {v5 .. v14}, Lokhttp3/internal/http/RealInterceptorChain;-><init>(Ljava/util/List;Lokhttp3/internal/connection/Transmitter;Lokhttp3/internal/connection/Exchange;ILokhttp3/Request;Lokhttp3/Call;III)V
iget-object v5, v0, Lokhttp3/internal/http/RealInterceptorChain;->interceptors:Ljava/util/List;
iget v6, v0, Lokhttp3/internal/http/RealInterceptorChain;->index:I
.line 141
invoke-interface {v5, v6}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v5
check-cast v5, Lokhttp3/Interceptor;
.line 142
invoke-interface {v5, v1}, Lokhttp3/Interceptor;->intercept(Lokhttp3/Interceptor$Chain;)Lokhttp3/Response;
move-result-object v6
if-eqz p3, :cond_5
iget v7, v0, Lokhttp3/internal/http/RealInterceptorChain;->index:I
add-int/2addr v7, v2
iget-object v8, v0, Lokhttp3/internal/http/RealInterceptorChain;->interceptors:Ljava/util/List;
.line 145
invoke-interface {v8}, Ljava/util/List;->size()I
move-result v8
if-ge v7, v8, :cond_5
iget v1, v1, Lokhttp3/internal/http/RealInterceptorChain;->calls:I
if-ne v1, v2, :cond_4
goto :goto_2
.line 146
:cond_4
new-instance v1, Ljava/lang/IllegalStateException;
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v2, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invoke-virtual {v2, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
invoke-direct {v1, v2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v1
:cond_5
:goto_2
const-string v1, "interceptor "
if-eqz v6, :cond_7
.line 155
invoke-virtual {v6}, Lokhttp3/Response;->body()Lokhttp3/ResponseBody;
move-result-object v2
if-eqz v2, :cond_6
return-object v6
.line 156
:cond_6
new-instance v2, Ljava/lang/IllegalStateException;
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {v3, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v3, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
const-string v1, " returned a response with no body"
invoke-virtual {v3, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-direct {v2, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v2
.line 152
:cond_7
new-instance v2, Ljava/lang/NullPointerException;
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {v3, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v3, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
const-string v1, " returned null"
invoke-virtual {v3, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-direct {v2, v1}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
throw v2
.line 122
:cond_8
new-instance v1, Ljava/lang/AssertionError;
invoke-direct {v1}, Ljava/lang/AssertionError;-><init>()V
throw v1
.end method
.method public readTimeoutMillis()I
.locals 1
iget v0, p0, Lokhttp3/internal/http/RealInterceptorChain;->readTimeout:I
return v0
.end method
.method public request()Lokhttp3/Request;
.locals 1
iget-object v0, p0, Lokhttp3/internal/http/RealInterceptorChain;->request:Lokhttp3/Request;
return-object v0
.end method
.method public transmitter()Lokhttp3/internal/connection/Transmitter;
.locals 1
iget-object v0, p0, Lokhttp3/internal/http/RealInterceptorChain;->transmitter:Lokhttp3/internal/connection/Transmitter;
return-object v0
.end method
.method public writeTimeoutMillis()I
.locals 1
iget v0, p0, Lokhttp3/internal/http/RealInterceptorChain;->writeTimeout:I
return v0
.end method

View File

@@ -0,0 +1,67 @@
.class public final Lokhttp3/internal/http/RealResponseBody;
.super Lokhttp3/ResponseBody;
.source "SourceFile"
# instance fields
.field public final contentLength:J
.field public final contentTypeString:Ljava/lang/String;
.field public final source:Lokio/BufferedSource;
# direct methods
.method public constructor <init>(Ljava/lang/String;JLokio/BufferedSource;)V
.locals 0
.line 33
invoke-direct {p0}, Lokhttp3/ResponseBody;-><init>()V
iput-object p1, p0, Lokhttp3/internal/http/RealResponseBody;->contentTypeString:Ljava/lang/String;
iput-wide p2, p0, Lokhttp3/internal/http/RealResponseBody;->contentLength:J
iput-object p4, p0, Lokhttp3/internal/http/RealResponseBody;->source:Lokio/BufferedSource;
return-void
.end method
# virtual methods
.method public contentLength()J
.locals 2
iget-wide v0, p0, Lokhttp3/internal/http/RealResponseBody;->contentLength:J
return-wide v0
.end method
.method public contentType()Lokhttp3/MediaType;
.locals 1
iget-object v0, p0, Lokhttp3/internal/http/RealResponseBody;->contentTypeString:Ljava/lang/String;
if-eqz v0, :cond_0
.line 40
invoke-static {v0}, Lokhttp3/MediaType;->parse(Ljava/lang/String;)Lokhttp3/MediaType;
move-result-object v0
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
return-object v0
.end method
.method public source()Lokio/BufferedSource;
.locals 1
iget-object v0, p0, Lokhttp3/internal/http/RealResponseBody;->source:Lokio/BufferedSource;
return-object v0
.end method

View File

@@ -0,0 +1,128 @@
.class public abstract Lokhttp3/internal/http/RequestLine;
.super Ljava/lang/Object;
.source "SourceFile"
# direct methods
.method public static get(Lokhttp3/Request;Ljava/net/Proxy$Type;)Ljava/lang/String;
.locals 2
.line 33
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
.line 34
invoke-virtual {p0}, Lokhttp3/Request;->method()Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const/16 v1, 0x20
.line 35
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
.line 37
invoke-static {p0, p1}, Lokhttp3/internal/http/RequestLine;->includeAuthorityInRequestLine(Lokhttp3/Request;Ljava/net/Proxy$Type;)Z
move-result p1
if-eqz p1, :cond_0
.line 38
invoke-virtual {p0}, Lokhttp3/Request;->url()Lokhttp3/HttpUrl;
move-result-object p0
invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
goto :goto_0
.line 40
:cond_0
invoke-virtual {p0}, Lokhttp3/Request;->url()Lokhttp3/HttpUrl;
move-result-object p0
invoke-static {p0}, Lokhttp3/internal/http/RequestLine;->requestPath(Lokhttp3/HttpUrl;)Ljava/lang/String;
move-result-object p0
invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
:goto_0
const-string p0, " HTTP/1.1"
.line 43
invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
.line 44
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
return-object p0
.end method
.method public static includeAuthorityInRequestLine(Lokhttp3/Request;Ljava/net/Proxy$Type;)Z
.locals 0
.line 52
invoke-virtual {p0}, Lokhttp3/Request;->isHttps()Z
move-result p0
if-nez p0, :cond_0
sget-object p0, Ljava/net/Proxy$Type;->HTTP:Ljava/net/Proxy$Type;
if-ne p1, p0, :cond_0
const/4 p0, 0x1
goto :goto_0
:cond_0
const/4 p0, 0x0
:goto_0
return p0
.end method
.method public static requestPath(Lokhttp3/HttpUrl;)Ljava/lang/String;
.locals 2
.line 60
invoke-virtual {p0}, Lokhttp3/HttpUrl;->encodedPath()Ljava/lang/String;
move-result-object v0
.line 61
invoke-virtual {p0}, Lokhttp3/HttpUrl;->encodedQuery()Ljava/lang/String;
move-result-object p0
if-eqz p0, :cond_0
.line 62
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const/16 v0, 0x3f
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
:cond_0
return-object v0
.end method

View File

@@ -0,0 +1,933 @@
.class public final Lokhttp3/internal/http/RetryAndFollowUpInterceptor;
.super Ljava/lang/Object;
.source "SourceFile"
# interfaces
.implements Lokhttp3/Interceptor;
# instance fields
.field public final client:Lokhttp3/OkHttpClient;
# direct methods
.method public constructor <init>(Lokhttp3/OkHttpClient;)V
.locals 0
.line 67
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->client:Lokhttp3/OkHttpClient;
return-void
.end method
# virtual methods
.method public final followUpRequest(Lokhttp3/Response;Lokhttp3/Route;)Lokhttp3/Request;
.locals 6
if-eqz p1, :cond_16
.line 216
invoke-virtual {p1}, Lokhttp3/Response;->code()I
move-result v0
.line 218
invoke-virtual {p1}, Lokhttp3/Response;->request()Lokhttp3/Request;
move-result-object v1
invoke-virtual {v1}, Lokhttp3/Request;->method()Ljava/lang/String;
move-result-object v1
const/16 v2, 0x133
const-string v3, "GET"
const/4 v4, 0x0
if-eq v0, v2, :cond_c
const/16 v2, 0x134
if-eq v0, v2, :cond_c
const/16 v2, 0x191
if-eq v0, v2, :cond_b
const/16 v2, 0x1f7
if-eq v0, v2, :cond_8
const/16 v2, 0x197
if-eq v0, v2, :cond_5
const/16 p2, 0x198
if-eq v0, p2, :cond_0
packed-switch v0, :pswitch_data_0
return-object v4
:cond_0
iget-object v0, p0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->client:Lokhttp3/OkHttpClient;
.line 288
invoke-virtual {v0}, Lokhttp3/OkHttpClient;->retryOnConnectionFailure()Z
move-result v0
if-nez v0, :cond_1
return-object v4
.line 293
:cond_1
invoke-virtual {p1}, Lokhttp3/Response;->request()Lokhttp3/Request;
move-result-object v0
invoke-virtual {v0}, Lokhttp3/Request;->body()Lokhttp3/RequestBody;
move-result-object v0
if-eqz v0, :cond_2
.line 294
invoke-virtual {v0}, Lokhttp3/RequestBody;->isOneShot()Z
move-result v0
if-eqz v0, :cond_2
return-object v4
.line 298
:cond_2
invoke-virtual {p1}, Lokhttp3/Response;->priorResponse()Lokhttp3/Response;
move-result-object v0
if-eqz v0, :cond_3
.line 299
invoke-virtual {p1}, Lokhttp3/Response;->priorResponse()Lokhttp3/Response;
move-result-object v0
invoke-virtual {v0}, Lokhttp3/Response;->code()I
move-result v0
if-ne v0, p2, :cond_3
return-object v4
:cond_3
const/4 p2, 0x0
.line 304
invoke-virtual {p0, p1, p2}, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->retryAfter(Lokhttp3/Response;I)I
move-result p2
if-lez p2, :cond_4
return-object v4
.line 308
:cond_4
invoke-virtual {p1}, Lokhttp3/Response;->request()Lokhttp3/Request;
move-result-object p1
return-object p1
:cond_5
if-eqz p2, :cond_6
.line 222
invoke-virtual {p2}, Lokhttp3/Route;->proxy()Ljava/net/Proxy;
move-result-object v0
goto :goto_0
:cond_6
iget-object v0, p0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->client:Lokhttp3/OkHttpClient;
.line 223
invoke-virtual {v0}, Lokhttp3/OkHttpClient;->proxy()Ljava/net/Proxy;
move-result-object v0
.line 224
:goto_0
invoke-virtual {v0}, Ljava/net/Proxy;->type()Ljava/net/Proxy$Type;
move-result-object v0
sget-object v1, Ljava/net/Proxy$Type;->HTTP:Ljava/net/Proxy$Type;
if-ne v0, v1, :cond_7
iget-object v0, p0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->client:Lokhttp3/OkHttpClient;
.line 227
invoke-virtual {v0}, Lokhttp3/OkHttpClient;->proxyAuthenticator()Lokhttp3/Authenticator;
move-result-object v0
invoke-interface {v0, p2, p1}, Lokhttp3/Authenticator;->authenticate(Lokhttp3/Route;Lokhttp3/Response;)Lokhttp3/Request;
move-result-object p1
return-object p1
.line 225
:cond_7
new-instance p1, Ljava/net/ProtocolException;
const-string p2, "Received HTTP_PROXY_AUTH (407) code while not using proxy"
invoke-direct {p1, p2}, Ljava/net/ProtocolException;-><init>(Ljava/lang/String;)V
throw p1
.line 311
:cond_8
invoke-virtual {p1}, Lokhttp3/Response;->priorResponse()Lokhttp3/Response;
move-result-object p2
if-eqz p2, :cond_9
.line 312
invoke-virtual {p1}, Lokhttp3/Response;->priorResponse()Lokhttp3/Response;
move-result-object p2
invoke-virtual {p2}, Lokhttp3/Response;->code()I
move-result p2
if-ne p2, v2, :cond_9
return-object v4
:cond_9
const p2, 0x7fffffff
.line 317
invoke-virtual {p0, p1, p2}, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->retryAfter(Lokhttp3/Response;I)I
move-result p2
if-nez p2, :cond_a
.line 319
invoke-virtual {p1}, Lokhttp3/Response;->request()Lokhttp3/Request;
move-result-object p1
return-object p1
:cond_a
return-object v4
:cond_b
iget-object v0, p0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->client:Lokhttp3/OkHttpClient;
.line 230
invoke-virtual {v0}, Lokhttp3/OkHttpClient;->authenticator()Lokhttp3/Authenticator;
move-result-object v0
invoke-interface {v0, p2, p1}, Lokhttp3/Authenticator;->authenticate(Lokhttp3/Route;Lokhttp3/Response;)Lokhttp3/Request;
move-result-object p1
return-object p1
.line 236
:cond_c
invoke-virtual {v1, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result p2
if-nez p2, :cond_d
const-string p2, "HEAD"
invoke-virtual {v1, p2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result p2
if-nez p2, :cond_d
return-object v4
:cond_d
:pswitch_0
iget-object p2, p0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->client:Lokhttp3/OkHttpClient;
.line 245
invoke-virtual {p2}, Lokhttp3/OkHttpClient;->followRedirects()Z
move-result p2
if-nez p2, :cond_e
return-object v4
:cond_e
const-string p2, "Location"
.line 247
invoke-virtual {p1, p2}, Lokhttp3/Response;->header(Ljava/lang/String;)Ljava/lang/String;
move-result-object p2
if-nez p2, :cond_f
return-object v4
.line 249
:cond_f
invoke-virtual {p1}, Lokhttp3/Response;->request()Lokhttp3/Request;
move-result-object v0
invoke-virtual {v0}, Lokhttp3/Request;->url()Lokhttp3/HttpUrl;
move-result-object v0
invoke-virtual {v0, p2}, Lokhttp3/HttpUrl;->resolve(Ljava/lang/String;)Lokhttp3/HttpUrl;
move-result-object p2
if-nez p2, :cond_10
return-object v4
.line 255
:cond_10
invoke-virtual {p2}, Lokhttp3/HttpUrl;->scheme()Ljava/lang/String;
move-result-object v0
invoke-virtual {p1}, Lokhttp3/Response;->request()Lokhttp3/Request;
move-result-object v2
invoke-virtual {v2}, Lokhttp3/Request;->url()Lokhttp3/HttpUrl;
move-result-object v2
invoke-virtual {v2}, Lokhttp3/HttpUrl;->scheme()Ljava/lang/String;
move-result-object v2
invoke-virtual {v0, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-nez v0, :cond_11
iget-object v0, p0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->client:Lokhttp3/OkHttpClient;
.line 256
invoke-virtual {v0}, Lokhttp3/OkHttpClient;->followSslRedirects()Z
move-result v0
if-nez v0, :cond_11
return-object v4
.line 259
:cond_11
invoke-virtual {p1}, Lokhttp3/Response;->request()Lokhttp3/Request;
move-result-object v0
invoke-virtual {v0}, Lokhttp3/Request;->newBuilder()Lokhttp3/Request$Builder;
move-result-object v0
.line 260
invoke-static {v1}, Lokhttp3/internal/http/HttpMethod;->permitsRequestBody(Ljava/lang/String;)Z
move-result v2
if-eqz v2, :cond_14
.line 261
invoke-static {v1}, Lokhttp3/internal/http/HttpMethod;->redirectsWithBody(Ljava/lang/String;)Z
move-result v2
.line 262
invoke-static {v1}, Lokhttp3/internal/http/HttpMethod;->redirectsToGet(Ljava/lang/String;)Z
move-result v5
if-eqz v5, :cond_12
.line 263
invoke-virtual {v0, v3, v4}, Lokhttp3/Request$Builder;->method(Ljava/lang/String;Lokhttp3/RequestBody;)Lokhttp3/Request$Builder;
goto :goto_1
:cond_12
if-eqz v2, :cond_13
.line 265
invoke-virtual {p1}, Lokhttp3/Response;->request()Lokhttp3/Request;
move-result-object v3
invoke-virtual {v3}, Lokhttp3/Request;->body()Lokhttp3/RequestBody;
move-result-object v4
.line 266
:cond_13
invoke-virtual {v0, v1, v4}, Lokhttp3/Request$Builder;->method(Ljava/lang/String;Lokhttp3/RequestBody;)Lokhttp3/Request$Builder;
:goto_1
if-nez v2, :cond_14
const-string v1, "Transfer-Encoding"
.line 269
invoke-virtual {v0, v1}, Lokhttp3/Request$Builder;->removeHeader(Ljava/lang/String;)Lokhttp3/Request$Builder;
const-string v1, "Content-Length"
.line 270
invoke-virtual {v0, v1}, Lokhttp3/Request$Builder;->removeHeader(Ljava/lang/String;)Lokhttp3/Request$Builder;
const-string v1, "Content-Type"
.line 271
invoke-virtual {v0, v1}, Lokhttp3/Request$Builder;->removeHeader(Ljava/lang/String;)Lokhttp3/Request$Builder;
.line 278
:cond_14
invoke-virtual {p1}, Lokhttp3/Response;->request()Lokhttp3/Request;
move-result-object p1
invoke-virtual {p1}, Lokhttp3/Request;->url()Lokhttp3/HttpUrl;
move-result-object p1
invoke-static {p1, p2}, Lokhttp3/internal/Util;->sameConnection(Lokhttp3/HttpUrl;Lokhttp3/HttpUrl;)Z
move-result p1
if-nez p1, :cond_15
const-string p1, "Authorization"
.line 279
invoke-virtual {v0, p1}, Lokhttp3/Request$Builder;->removeHeader(Ljava/lang/String;)Lokhttp3/Request$Builder;
.line 282
:cond_15
invoke-virtual {v0, p2}, Lokhttp3/Request$Builder;->url(Lokhttp3/HttpUrl;)Lokhttp3/Request$Builder;
move-result-object p1
invoke-virtual {p1}, Lokhttp3/Request$Builder;->build()Lokhttp3/Request;
move-result-object p1
return-object p1
.line 215
:cond_16
new-instance p1, Ljava/lang/IllegalStateException;
invoke-direct {p1}, Ljava/lang/IllegalStateException;-><init>()V
throw p1
nop
:pswitch_data_0
.packed-switch 0x12c
:pswitch_0
:pswitch_0
:pswitch_0
:pswitch_0
.end packed-switch
.end method
.method public intercept(Lokhttp3/Interceptor$Chain;)Lokhttp3/Response;
.locals 8
.line 72
invoke-interface {p1}, Lokhttp3/Interceptor$Chain;->request()Lokhttp3/Request;
move-result-object v0
.line 73
check-cast p1, Lokhttp3/internal/http/RealInterceptorChain;
.line 74
invoke-virtual {p1}, Lokhttp3/internal/http/RealInterceptorChain;->transmitter()Lokhttp3/internal/connection/Transmitter;
move-result-object v1
const/4 v2, 0x0
const/4 v3, 0x0
move v5, v2
move-object v4, v3
.line 79
:goto_0
invoke-virtual {v1, v0}, Lokhttp3/internal/connection/Transmitter;->prepareToConnect(Lokhttp3/Request;)V
.line 81
invoke-virtual {v1}, Lokhttp3/internal/connection/Transmitter;->isCanceled()Z
move-result v6
if-nez v6, :cond_9
.line 88
:try_start_0
invoke-virtual {p1, v0, v1, v3}, Lokhttp3/internal/http/RealInterceptorChain;->proceed(Lokhttp3/Request;Lokhttp3/internal/connection/Transmitter;Lokhttp3/internal/connection/Exchange;)Lokhttp3/Response;
move-result-object v0
:try_end_0
.catch Lokhttp3/internal/connection/RouteException; {:try_start_0 .. :try_end_0} :catch_1
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
if-eqz v4, :cond_0
.line 110
invoke-virtual {v0}, Lokhttp3/Response;->newBuilder()Lokhttp3/Response$Builder;
move-result-object v0
.line 111
invoke-virtual {v4}, Lokhttp3/Response;->newBuilder()Lokhttp3/Response$Builder;
move-result-object v4
.line 112
invoke-virtual {v4, v3}, Lokhttp3/Response$Builder;->body(Lokhttp3/ResponseBody;)Lokhttp3/Response$Builder;
move-result-object v4
.line 113
invoke-virtual {v4}, Lokhttp3/Response$Builder;->build()Lokhttp3/Response;
move-result-object v4
.line 111
invoke-virtual {v0, v4}, Lokhttp3/Response$Builder;->priorResponse(Lokhttp3/Response;)Lokhttp3/Response$Builder;
move-result-object v0
.line 114
invoke-virtual {v0}, Lokhttp3/Response$Builder;->build()Lokhttp3/Response;
move-result-object v0
:cond_0
move-object v4, v0
sget-object v0, Lokhttp3/internal/Internal;->instance:Lokhttp3/internal/Internal;
.line 117
invoke-virtual {v0, v4}, Lokhttp3/internal/Internal;->exchange(Lokhttp3/Response;)Lokhttp3/internal/connection/Exchange;
move-result-object v0
if-eqz v0, :cond_1
.line 118
invoke-virtual {v0}, Lokhttp3/internal/connection/Exchange;->connection()Lokhttp3/internal/connection/RealConnection;
move-result-object v6
invoke-virtual {v6}, Lokhttp3/internal/connection/RealConnection;->route()Lokhttp3/Route;
move-result-object v6
goto :goto_1
:cond_1
move-object v6, v3
.line 119
:goto_1
invoke-virtual {p0, v4, v6}, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->followUpRequest(Lokhttp3/Response;Lokhttp3/Route;)Lokhttp3/Request;
move-result-object v6
if-nez v6, :cond_3
if-eqz v0, :cond_2
.line 122
invoke-virtual {v0}, Lokhttp3/internal/connection/Exchange;->isDuplex()Z
move-result p1
if-eqz p1, :cond_2
.line 123
invoke-virtual {v1}, Lokhttp3/internal/connection/Transmitter;->timeoutEarlyExit()V
:cond_2
return-object v4
.line 128
:cond_3
invoke-virtual {v6}, Lokhttp3/Request;->body()Lokhttp3/RequestBody;
move-result-object v7
if-eqz v7, :cond_4
.line 129
invoke-virtual {v7}, Lokhttp3/RequestBody;->isOneShot()Z
move-result v7
if-eqz v7, :cond_4
return-object v4
.line 133
:cond_4
invoke-virtual {v4}, Lokhttp3/Response;->body()Lokhttp3/ResponseBody;
move-result-object v7
invoke-static {v7}, Lokhttp3/internal/Util;->closeQuietly(Ljava/io/Closeable;)V
.line 134
invoke-virtual {v1}, Lokhttp3/internal/connection/Transmitter;->hasExchange()Z
move-result v7
if-eqz v7, :cond_5
.line 135
invoke-virtual {v0}, Lokhttp3/internal/connection/Exchange;->detachWithViolence()V
:cond_5
add-int/lit8 v5, v5, 0x1
const/16 v0, 0x14
if-gt v5, v0, :cond_6
move-object v0, v6
goto :goto_0
.line 139
:cond_6
new-instance p1, Ljava/net/ProtocolException;
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const-string v1, "Too many follow-up requests: "
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0, v5}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
invoke-direct {p1, v0}, Ljava/net/ProtocolException;-><init>(Ljava/lang/String;)V
throw p1
:catchall_0
move-exception p1
goto :goto_3
:catch_0
move-exception v6
.line 98
:try_start_1
instance-of v7, v6, Lokhttp3/internal/http2/ConnectionShutdownException;
xor-int/lit8 v7, v7, 0x1
.line 99
invoke-virtual {p0, v6, v1, v7, v0}, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->recover(Ljava/io/IOException;Lokhttp3/internal/connection/Transmitter;ZLokhttp3/Request;)Z
move-result v7
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
if-eqz v7, :cond_7
.line 104
:goto_2
invoke-virtual {v1}, Lokhttp3/internal/connection/Transmitter;->exchangeDoneDueToException()V
goto/16 :goto_0
.line 99
:cond_7
:try_start_2
throw v6
:catch_1
move-exception v6
.line 92
invoke-virtual {v6}, Lokhttp3/internal/connection/RouteException;->getLastConnectException()Ljava/io/IOException;
move-result-object v7
invoke-virtual {p0, v7, v1, v2, v0}, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->recover(Ljava/io/IOException;Lokhttp3/internal/connection/Transmitter;ZLokhttp3/Request;)Z
move-result v7
if-eqz v7, :cond_8
goto :goto_2
.line 93
:cond_8
invoke-virtual {v6}, Lokhttp3/internal/connection/RouteException;->getFirstConnectException()Ljava/io/IOException;
move-result-object p1
throw p1
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
.line 104
:goto_3
invoke-virtual {v1}, Lokhttp3/internal/connection/Transmitter;->exchangeDoneDueToException()V
throw p1
.line 82
:cond_9
new-instance p1, Ljava/io/IOException;
const-string v0, "Canceled"
invoke-direct {p1, v0}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public final isRecoverable(Ljava/io/IOException;Z)Z
.locals 3
.line 179
instance-of v0, p1, Ljava/net/ProtocolException;
const/4 v1, 0x0
if-eqz v0, :cond_0
return v1
.line 185
:cond_0
instance-of v0, p1, Ljava/io/InterruptedIOException;
const/4 v2, 0x1
if-eqz v0, :cond_2
.line 186
instance-of p1, p1, Ljava/net/SocketTimeoutException;
if-eqz p1, :cond_1
if-nez p2, :cond_1
move v1, v2
:cond_1
return v1
.line 191
:cond_2
instance-of p2, p1, Ljavax/net/ssl/SSLHandshakeException;
if-eqz p2, :cond_3
.line 194
invoke-virtual {p1}, Ljava/lang/Throwable;->getCause()Ljava/lang/Throwable;
move-result-object p2
instance-of p2, p2, Ljava/security/cert/CertificateException;
if-eqz p2, :cond_3
return v1
.line 198
:cond_3
instance-of p1, p1, Ljavax/net/ssl/SSLPeerUnverifiedException;
if-eqz p1, :cond_4
return v1
:cond_4
return v2
.end method
.method public final recover(Ljava/io/IOException;Lokhttp3/internal/connection/Transmitter;ZLokhttp3/Request;)Z
.locals 2
iget-object v0, p0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->client:Lokhttp3/OkHttpClient;
.line 156
invoke-virtual {v0}, Lokhttp3/OkHttpClient;->retryOnConnectionFailure()Z
move-result v0
const/4 v1, 0x0
if-nez v0, :cond_0
return v1
:cond_0
if-eqz p3, :cond_1
.line 159
invoke-virtual {p0, p1, p4}, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->requestIsOneShot(Ljava/io/IOException;Lokhttp3/Request;)Z
move-result p4
if-eqz p4, :cond_1
return v1
.line 162
:cond_1
invoke-virtual {p0, p1, p3}, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->isRecoverable(Ljava/io/IOException;Z)Z
move-result p1
if-nez p1, :cond_2
return v1
.line 165
:cond_2
invoke-virtual {p2}, Lokhttp3/internal/connection/Transmitter;->canRetry()Z
move-result p1
if-nez p1, :cond_3
return v1
:cond_3
const/4 p1, 0x1
return p1
.end method
.method public final requestIsOneShot(Ljava/io/IOException;Lokhttp3/Request;)Z
.locals 0
.line 172
invoke-virtual {p2}, Lokhttp3/Request;->body()Lokhttp3/RequestBody;
move-result-object p2
if-eqz p2, :cond_0
.line 173
invoke-virtual {p2}, Lokhttp3/RequestBody;->isOneShot()Z
move-result p2
if-nez p2, :cond_1
:cond_0
instance-of p1, p1, Ljava/io/FileNotFoundException;
if-eqz p1, :cond_2
:cond_1
const/4 p1, 0x1
goto :goto_0
:cond_2
const/4 p1, 0x0
:goto_0
return p1
.end method
.method public final retryAfter(Lokhttp3/Response;I)I
.locals 1
const-string v0, "Retry-After"
.line 330
invoke-virtual {p1, v0}, Lokhttp3/Response;->header(Ljava/lang/String;)Ljava/lang/String;
move-result-object p1
if-nez p1, :cond_0
return p2
:cond_0
const-string p2, "\\d+"
.line 338
invoke-virtual {p1, p2}, Ljava/lang/String;->matches(Ljava/lang/String;)Z
move-result p2
if-eqz p2, :cond_1
.line 339
invoke-static {p1}, Ljava/lang/Integer;->valueOf(Ljava/lang/String;)Ljava/lang/Integer;
move-result-object p1
invoke-virtual {p1}, Ljava/lang/Integer;->intValue()I
move-result p1
return p1
:cond_1
const p1, 0x7fffffff
return p1
.end method

View File

@@ -0,0 +1,337 @@
.class public final Lokhttp3/internal/http/StatusLine;
.super Ljava/lang/Object;
.source "SourceFile"
# instance fields
.field public final code:I
.field public final message:Ljava/lang/String;
.field public final protocol:Lokhttp3/Protocol;
# direct methods
.method public constructor <init>(Lokhttp3/Protocol;ILjava/lang/String;)V
.locals 0
.line 34
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Lokhttp3/internal/http/StatusLine;->protocol:Lokhttp3/Protocol;
iput p2, p0, Lokhttp3/internal/http/StatusLine;->code:I
iput-object p3, p0, Lokhttp3/internal/http/StatusLine;->message:Ljava/lang/String;
return-void
.end method
.method public static parse(Ljava/lang/String;)Lokhttp3/internal/http/StatusLine;
.locals 8
const-string v0, "HTTP/1."
.line 51
invoke-virtual {p0, v0}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
move-result v0
const/4 v1, 0x4
const/16 v2, 0x20
const-string v3, "Unexpected status line: "
if-eqz v0, :cond_3
.line 52
invoke-virtual {p0}, Ljava/lang/String;->length()I
move-result v0
const/16 v4, 0x9
if-lt v0, v4, :cond_2
const/16 v0, 0x8
invoke-virtual {p0, v0}, Ljava/lang/String;->charAt(I)C
move-result v0
if-ne v0, v2, :cond_2
const/4 v0, 0x7
.line 55
invoke-virtual {p0, v0}, Ljava/lang/String;->charAt(I)C
move-result v0
add-int/lit8 v0, v0, -0x30
if-nez v0, :cond_0
.line 58
sget-object v0, Lokhttp3/Protocol;->HTTP_1_0:Lokhttp3/Protocol;
goto :goto_0
:cond_0
const/4 v5, 0x1
if-ne v0, v5, :cond_1
.line 60
sget-object v0, Lokhttp3/Protocol;->HTTP_1_1:Lokhttp3/Protocol;
goto :goto_0
.line 62
:cond_1
new-instance v0, Ljava/net/ProtocolException;
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
invoke-direct {v0, p0}, Ljava/net/ProtocolException;-><init>(Ljava/lang/String;)V
throw v0
.line 53
:cond_2
new-instance v0, Ljava/net/ProtocolException;
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
invoke-direct {v0, p0}, Ljava/net/ProtocolException;-><init>(Ljava/lang/String;)V
throw v0
:cond_3
const-string v0, "ICY "
.line 64
invoke-virtual {p0, v0}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
move-result v0
if-eqz v0, :cond_7
.line 66
sget-object v0, Lokhttp3/Protocol;->HTTP_1_0:Lokhttp3/Protocol;
move v4, v1
.line 73
:goto_0
invoke-virtual {p0}, Ljava/lang/String;->length()I
move-result v5
add-int/lit8 v6, v4, 0x3
if-lt v5, v6, :cond_6
.line 78
:try_start_0
invoke-virtual {p0, v4, v6}, Ljava/lang/String;->substring(II)Ljava/lang/String;
move-result-object v5
invoke-static {v5}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I
move-result v5
:try_end_0
.catch Ljava/lang/NumberFormatException; {:try_start_0 .. :try_end_0} :catch_0
.line 86
invoke-virtual {p0}, Ljava/lang/String;->length()I
move-result v7
if-le v7, v6, :cond_5
.line 87
invoke-virtual {p0, v6}, Ljava/lang/String;->charAt(I)C
move-result v6
if-ne v6, v2, :cond_4
add-int/2addr v4, v1
.line 90
invoke-virtual {p0, v4}, Ljava/lang/String;->substring(I)Ljava/lang/String;
move-result-object p0
goto :goto_1
.line 88
:cond_4
new-instance v0, Ljava/net/ProtocolException;
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
invoke-direct {v0, p0}, Ljava/net/ProtocolException;-><init>(Ljava/lang/String;)V
throw v0
:cond_5
const-string p0, ""
.line 93
:goto_1
new-instance v1, Lokhttp3/internal/http/StatusLine;
invoke-direct {v1, v0, v5, p0}, Lokhttp3/internal/http/StatusLine;-><init>(Lokhttp3/Protocol;ILjava/lang/String;)V
return-object v1
.line 80
:catch_0
new-instance v0, Ljava/net/ProtocolException;
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
invoke-direct {v0, p0}, Ljava/net/ProtocolException;-><init>(Ljava/lang/String;)V
throw v0
.line 74
:cond_6
new-instance v0, Ljava/net/ProtocolException;
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
invoke-direct {v0, p0}, Ljava/net/ProtocolException;-><init>(Ljava/lang/String;)V
throw v0
.line 69
:cond_7
new-instance v0, Ljava/net/ProtocolException;
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
invoke-direct {v0, p0}, Ljava/net/ProtocolException;-><init>(Ljava/lang/String;)V
throw v0
.end method
# virtual methods
.method public toString()Ljava/lang/String;
.locals 3
.line 97
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
iget-object v1, p0, Lokhttp3/internal/http/StatusLine;->protocol:Lokhttp3/Protocol;
.line 98
sget-object v2, Lokhttp3/Protocol;->HTTP_1_0:Lokhttp3/Protocol;
if-ne v1, v2, :cond_0
const-string v1, "HTTP/1.0"
goto :goto_0
:cond_0
const-string v1, "HTTP/1.1"
:goto_0
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const/16 v1, 0x20
.line 99
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
iget v2, p0, Lokhttp3/internal/http/StatusLine;->code:I
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
iget-object v2, p0, Lokhttp3/internal/http/StatusLine;->message:Ljava/lang/String;
if-eqz v2, :cond_1
.line 101
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
iget-object v1, p0, Lokhttp3/internal/http/StatusLine;->message:Ljava/lang/String;
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
.line 103
:cond_1
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
return-object v0
.end method

View File

@@ -0,0 +1,14 @@
.class public abstract synthetic Lokhttp3/internal/http1/Http1ExchangeCodec$1;
.super Ljava/lang/Object;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lokhttp3/internal/http1/Http1ExchangeCodec;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1009
name = null
.end annotation

View File

@@ -0,0 +1,181 @@
.class public abstract Lokhttp3/internal/http1/Http1ExchangeCodec$AbstractSource;
.super Ljava/lang/Object;
.source "SourceFile"
# interfaces
.implements Lokio/Source;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lokhttp3/internal/http1/Http1ExchangeCodec;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x401
name = "AbstractSource"
.end annotation
# instance fields
.field public closed:Z
.field public final synthetic this$0:Lokhttp3/internal/http1/Http1ExchangeCodec;
.field public final timeout:Lokio/ForwardingTimeout;
# direct methods
.method public constructor <init>(Lokhttp3/internal/http1/Http1ExchangeCodec;)V
.locals 1
iput-object p1, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$AbstractSource;->this$0:Lokhttp3/internal/http1/Http1ExchangeCodec;
.line 379
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 380
new-instance v0, Lokio/ForwardingTimeout;
invoke-static {p1}, Lokhttp3/internal/http1/Http1ExchangeCodec;->access$500(Lokhttp3/internal/http1/Http1ExchangeCodec;)Lokio/BufferedSource;
move-result-object p1
invoke-interface {p1}, Lokio/Source;->timeout()Lokio/Timeout;
move-result-object p1
invoke-direct {v0, p1}, Lokio/ForwardingTimeout;-><init>(Lokio/Timeout;)V
iput-object v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$AbstractSource;->timeout:Lokio/ForwardingTimeout;
return-void
.end method
.method public synthetic constructor <init>(Lokhttp3/internal/http1/Http1ExchangeCodec;Lokhttp3/internal/http1/Http1ExchangeCodec$1;)V
.locals 0
.line 379
invoke-direct {p0, p1}, Lokhttp3/internal/http1/Http1ExchangeCodec$AbstractSource;-><init>(Lokhttp3/internal/http1/Http1ExchangeCodec;)V
return-void
.end method
# virtual methods
.method public read(Lokio/Buffer;J)J
.locals 1
:try_start_0
iget-object v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$AbstractSource;->this$0:Lokhttp3/internal/http1/Http1ExchangeCodec;
.line 389
invoke-static {v0}, Lokhttp3/internal/http1/Http1ExchangeCodec;->access$500(Lokhttp3/internal/http1/Http1ExchangeCodec;)Lokio/BufferedSource;
move-result-object v0
invoke-interface {v0, p1, p2, p3}, Lokio/Source;->read(Lokio/Buffer;J)J
move-result-wide p1
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
return-wide p1
:catch_0
move-exception p1
iget-object p2, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$AbstractSource;->this$0:Lokhttp3/internal/http1/Http1ExchangeCodec;
.line 391
invoke-static {p2}, Lokhttp3/internal/http1/Http1ExchangeCodec;->access$600(Lokhttp3/internal/http1/Http1ExchangeCodec;)Lokhttp3/internal/connection/RealConnection;
move-result-object p2
invoke-virtual {p2}, Lokhttp3/internal/connection/RealConnection;->noNewExchanges()V
.line 392
invoke-virtual {p0}, Lokhttp3/internal/http1/Http1ExchangeCodec$AbstractSource;->responseBodyComplete()V
.line 393
throw p1
.end method
.method public final responseBodyComplete()V
.locals 3
iget-object v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$AbstractSource;->this$0:Lokhttp3/internal/http1/Http1ExchangeCodec;
.line 402
invoke-static {v0}, Lokhttp3/internal/http1/Http1ExchangeCodec;->access$400(Lokhttp3/internal/http1/Http1ExchangeCodec;)I
move-result v0
const/4 v1, 0x6
if-ne v0, v1, :cond_0
return-void
:cond_0
iget-object v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$AbstractSource;->this$0:Lokhttp3/internal/http1/Http1ExchangeCodec;
.line 403
invoke-static {v0}, Lokhttp3/internal/http1/Http1ExchangeCodec;->access$400(Lokhttp3/internal/http1/Http1ExchangeCodec;)I
move-result v0
const/4 v2, 0x5
if-ne v0, v2, :cond_1
iget-object v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$AbstractSource;->this$0:Lokhttp3/internal/http1/Http1ExchangeCodec;
iget-object v2, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$AbstractSource;->timeout:Lokio/ForwardingTimeout;
.line 405
invoke-static {v0, v2}, Lokhttp3/internal/http1/Http1ExchangeCodec;->access$300(Lokhttp3/internal/http1/Http1ExchangeCodec;Lokio/ForwardingTimeout;)V
iget-object v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$AbstractSource;->this$0:Lokhttp3/internal/http1/Http1ExchangeCodec;
.line 407
invoke-static {v0, v1}, Lokhttp3/internal/http1/Http1ExchangeCodec;->access$402(Lokhttp3/internal/http1/Http1ExchangeCodec;I)I
return-void
.line 403
:cond_1
new-instance v0, Ljava/lang/IllegalStateException;
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "state: "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object v2, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$AbstractSource;->this$0:Lokhttp3/internal/http1/Http1ExchangeCodec;
invoke-static {v2}, Lokhttp3/internal/http1/Http1ExchangeCodec;->access$400(Lokhttp3/internal/http1/Http1ExchangeCodec;)I
move-result v2
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v0
.end method
.method public timeout()Lokio/Timeout;
.locals 1
iget-object v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$AbstractSource;->timeout:Lokio/ForwardingTimeout;
return-object v0
.end method

View File

@@ -0,0 +1,236 @@
.class public final Lokhttp3/internal/http1/Http1ExchangeCodec$ChunkedSink;
.super Ljava/lang/Object;
.source "SourceFile"
# interfaces
.implements Lokio/Sink;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lokhttp3/internal/http1/Http1ExchangeCodec;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x11
name = "ChunkedSink"
.end annotation
# instance fields
.field public closed:Z
.field public final synthetic this$0:Lokhttp3/internal/http1/Http1ExchangeCodec;
.field public final timeout:Lokio/ForwardingTimeout;
# direct methods
.method public constructor <init>(Lokhttp3/internal/http1/Http1ExchangeCodec;)V
.locals 1
iput-object p1, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$ChunkedSink;->this$0:Lokhttp3/internal/http1/Http1ExchangeCodec;
.line 348
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 345
new-instance v0, Lokio/ForwardingTimeout;
invoke-static {p1}, Lokhttp3/internal/http1/Http1ExchangeCodec;->access$200(Lokhttp3/internal/http1/Http1ExchangeCodec;)Lokio/BufferedSink;
move-result-object p1
invoke-interface {p1}, Lokio/Sink;->timeout()Lokio/Timeout;
move-result-object p1
invoke-direct {v0, p1}, Lokio/ForwardingTimeout;-><init>(Lokio/Timeout;)V
iput-object v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$ChunkedSink;->timeout:Lokio/ForwardingTimeout;
return-void
.end method
# virtual methods
.method public declared-synchronized close()V
.locals 2
monitor-enter p0
:try_start_0
iget-boolean v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$ChunkedSink;->closed:Z
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
if-eqz v0, :cond_0
.line 371
monitor-exit p0
return-void
:cond_0
const/4 v0, 0x1
:try_start_1
iput-boolean v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$ChunkedSink;->closed:Z
iget-object v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$ChunkedSink;->this$0:Lokhttp3/internal/http1/Http1ExchangeCodec;
.line 373
invoke-static {v0}, Lokhttp3/internal/http1/Http1ExchangeCodec;->access$200(Lokhttp3/internal/http1/Http1ExchangeCodec;)Lokio/BufferedSink;
move-result-object v0
const-string v1, "0\r\n\r\n"
invoke-interface {v0, v1}, Lokio/BufferedSink;->writeUtf8(Ljava/lang/String;)Lokio/BufferedSink;
iget-object v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$ChunkedSink;->this$0:Lokhttp3/internal/http1/Http1ExchangeCodec;
iget-object v1, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$ChunkedSink;->timeout:Lokio/ForwardingTimeout;
.line 374
invoke-static {v0, v1}, Lokhttp3/internal/http1/Http1ExchangeCodec;->access$300(Lokhttp3/internal/http1/Http1ExchangeCodec;Lokio/ForwardingTimeout;)V
iget-object v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$ChunkedSink;->this$0:Lokhttp3/internal/http1/Http1ExchangeCodec;
const/4 v1, 0x3
.line 375
invoke-static {v0, v1}, Lokhttp3/internal/http1/Http1ExchangeCodec;->access$402(Lokhttp3/internal/http1/Http1ExchangeCodec;I)I
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
.line 376
monitor-exit p0
return-void
:catchall_0
move-exception v0
monitor-exit p0
throw v0
.end method
.method public declared-synchronized flush()V
.locals 1
monitor-enter p0
:try_start_0
iget-boolean v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$ChunkedSink;->closed:Z
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
if-eqz v0, :cond_0
.line 366
monitor-exit p0
return-void
:cond_0
:try_start_1
iget-object v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$ChunkedSink;->this$0:Lokhttp3/internal/http1/Http1ExchangeCodec;
.line 367
invoke-static {v0}, Lokhttp3/internal/http1/Http1ExchangeCodec;->access$200(Lokhttp3/internal/http1/Http1ExchangeCodec;)Lokio/BufferedSink;
move-result-object v0
invoke-interface {v0}, Lokio/BufferedSink;->flush()V
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
.line 368
monitor-exit p0
return-void
:catchall_0
move-exception v0
monitor-exit p0
throw v0
.end method
.method public timeout()Lokio/Timeout;
.locals 1
iget-object v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$ChunkedSink;->timeout:Lokio/ForwardingTimeout;
return-object v0
.end method
.method public write(Lokio/Buffer;J)V
.locals 2
iget-boolean v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$ChunkedSink;->closed:Z
if-nez v0, :cond_1
const-wide/16 v0, 0x0
cmp-long v0, p2, v0
if-nez v0, :cond_0
return-void
:cond_0
iget-object v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$ChunkedSink;->this$0:Lokhttp3/internal/http1/Http1ExchangeCodec;
.line 359
invoke-static {v0}, Lokhttp3/internal/http1/Http1ExchangeCodec;->access$200(Lokhttp3/internal/http1/Http1ExchangeCodec;)Lokio/BufferedSink;
move-result-object v0
invoke-interface {v0, p2, p3}, Lokio/BufferedSink;->writeHexadecimalUnsignedLong(J)Lokio/BufferedSink;
iget-object v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$ChunkedSink;->this$0:Lokhttp3/internal/http1/Http1ExchangeCodec;
.line 360
invoke-static {v0}, Lokhttp3/internal/http1/Http1ExchangeCodec;->access$200(Lokhttp3/internal/http1/Http1ExchangeCodec;)Lokio/BufferedSink;
move-result-object v0
const-string v1, "\r\n"
invoke-interface {v0, v1}, Lokio/BufferedSink;->writeUtf8(Ljava/lang/String;)Lokio/BufferedSink;
iget-object v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$ChunkedSink;->this$0:Lokhttp3/internal/http1/Http1ExchangeCodec;
.line 361
invoke-static {v0}, Lokhttp3/internal/http1/Http1ExchangeCodec;->access$200(Lokhttp3/internal/http1/Http1ExchangeCodec;)Lokio/BufferedSink;
move-result-object v0
invoke-interface {v0, p1, p2, p3}, Lokio/Sink;->write(Lokio/Buffer;J)V
iget-object p1, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$ChunkedSink;->this$0:Lokhttp3/internal/http1/Http1ExchangeCodec;
.line 362
invoke-static {p1}, Lokhttp3/internal/http1/Http1ExchangeCodec;->access$200(Lokhttp3/internal/http1/Http1ExchangeCodec;)Lokio/BufferedSink;
move-result-object p1
invoke-interface {p1, v1}, Lokio/BufferedSink;->writeUtf8(Ljava/lang/String;)Lokio/BufferedSink;
return-void
.line 356
:cond_1
new-instance p1, Ljava/lang/IllegalStateException;
const-string p2, "closed"
invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p1
.end method

View File

@@ -0,0 +1,394 @@
.class public Lokhttp3/internal/http1/Http1ExchangeCodec$ChunkedSource;
.super Lokhttp3/internal/http1/Http1ExchangeCodec$AbstractSource;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lokhttp3/internal/http1/Http1ExchangeCodec;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1
name = "ChunkedSource"
.end annotation
# instance fields
.field public bytesRemainingInChunk:J
.field public hasMoreChunks:Z
.field public final synthetic this$0:Lokhttp3/internal/http1/Http1ExchangeCodec;
.field public final url:Lokhttp3/HttpUrl;
# direct methods
.method public constructor <init>(Lokhttp3/internal/http1/Http1ExchangeCodec;Lokhttp3/HttpUrl;)V
.locals 2
iput-object p1, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$ChunkedSource;->this$0:Lokhttp3/internal/http1/Http1ExchangeCodec;
const/4 v0, 0x0
.line 461
invoke-direct {p0, p1, v0}, Lokhttp3/internal/http1/Http1ExchangeCodec$AbstractSource;-><init>(Lokhttp3/internal/http1/Http1ExchangeCodec;Lokhttp3/internal/http1/Http1ExchangeCodec$1;)V
const-wide/16 v0, -0x1
iput-wide v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$ChunkedSource;->bytesRemainingInChunk:J
const/4 p1, 0x1
iput-boolean p1, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$ChunkedSource;->hasMoreChunks:Z
iput-object p2, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$ChunkedSource;->url:Lokhttp3/HttpUrl;
return-void
.end method
# virtual methods
.method public close()V
.locals 2
iget-boolean v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$AbstractSource;->closed:Z
if-eqz v0, :cond_0
return-void
:cond_0
iget-boolean v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$ChunkedSource;->hasMoreChunks:Z
if-eqz v0, :cond_1
const/16 v0, 0x64
.line 511
sget-object v1, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit;
invoke-static {p0, v0, v1}, Lokhttp3/internal/Util;->discard(Lokio/Source;ILjava/util/concurrent/TimeUnit;)Z
move-result v0
if-nez v0, :cond_1
iget-object v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$ChunkedSource;->this$0:Lokhttp3/internal/http1/Http1ExchangeCodec;
.line 512
invoke-static {v0}, Lokhttp3/internal/http1/Http1ExchangeCodec;->access$600(Lokhttp3/internal/http1/Http1ExchangeCodec;)Lokhttp3/internal/connection/RealConnection;
move-result-object v0
invoke-virtual {v0}, Lokhttp3/internal/connection/RealConnection;->noNewExchanges()V
.line 513
invoke-virtual {p0}, Lokhttp3/internal/http1/Http1ExchangeCodec$AbstractSource;->responseBodyComplete()V
:cond_1
const/4 v0, 0x1
iput-boolean v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$AbstractSource;->closed:Z
return-void
.end method
.method public read(Lokio/Buffer;J)J
.locals 7
const-wide/16 v0, 0x0
cmp-long v2, p2, v0
if-ltz v2, :cond_5
iget-boolean v2, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$AbstractSource;->closed:Z
if-nez v2, :cond_4
iget-boolean v2, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$ChunkedSource;->hasMoreChunks:Z
const-wide/16 v3, -0x1
if-nez v2, :cond_0
return-wide v3
:cond_0
iget-wide v5, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$ChunkedSource;->bytesRemainingInChunk:J
cmp-long v0, v5, v0
if-eqz v0, :cond_1
cmp-long v0, v5, v3
if-nez v0, :cond_2
.line 471
:cond_1
invoke-virtual {p0}, Lokhttp3/internal/http1/Http1ExchangeCodec$ChunkedSource;->readChunkSize()V
iget-boolean v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$ChunkedSource;->hasMoreChunks:Z
if-nez v0, :cond_2
return-wide v3
:cond_2
iget-wide v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$ChunkedSource;->bytesRemainingInChunk:J
.line 475
invoke-static {p2, p3, v0, v1}, Ljava/lang/Math;->min(JJ)J
move-result-wide p2
invoke-super {p0, p1, p2, p3}, Lokhttp3/internal/http1/Http1ExchangeCodec$AbstractSource;->read(Lokio/Buffer;J)J
move-result-wide p1
cmp-long p3, p1, v3
if-eqz p3, :cond_3
iget-wide v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$ChunkedSource;->bytesRemainingInChunk:J
sub-long/2addr v0, p1
iput-wide v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$ChunkedSource;->bytesRemainingInChunk:J
return-wide p1
:cond_3
iget-object p1, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$ChunkedSource;->this$0:Lokhttp3/internal/http1/Http1ExchangeCodec;
.line 477
invoke-static {p1}, Lokhttp3/internal/http1/Http1ExchangeCodec;->access$600(Lokhttp3/internal/http1/Http1ExchangeCodec;)Lokhttp3/internal/connection/RealConnection;
move-result-object p1
invoke-virtual {p1}, Lokhttp3/internal/connection/RealConnection;->noNewExchanges()V
.line 478
new-instance p1, Ljava/net/ProtocolException;
const-string p2, "unexpected end of stream"
invoke-direct {p1, p2}, Ljava/net/ProtocolException;-><init>(Ljava/lang/String;)V
.line 479
invoke-virtual {p0}, Lokhttp3/internal/http1/Http1ExchangeCodec$AbstractSource;->responseBodyComplete()V
.line 480
throw p1
.line 467
:cond_4
new-instance p1, Ljava/lang/IllegalStateException;
const-string p2, "closed"
invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p1
.line 466
:cond_5
new-instance p1, Ljava/lang/IllegalArgumentException;
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const-string v1, "byteCount < 0: "
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0, p2, p3}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p2
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public final readChunkSize()V
.locals 5
iget-wide v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$ChunkedSource;->bytesRemainingInChunk:J
const-wide/16 v2, -0x1
cmp-long v0, v0, v2
if-eqz v0, :cond_0
iget-object v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$ChunkedSource;->this$0:Lokhttp3/internal/http1/Http1ExchangeCodec;
.line 489
invoke-static {v0}, Lokhttp3/internal/http1/Http1ExchangeCodec;->access$500(Lokhttp3/internal/http1/Http1ExchangeCodec;)Lokio/BufferedSource;
move-result-object v0
invoke-interface {v0}, Lokio/BufferedSource;->readUtf8LineStrict()Ljava/lang/String;
:cond_0
:try_start_0
iget-object v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$ChunkedSource;->this$0:Lokhttp3/internal/http1/Http1ExchangeCodec;
.line 492
invoke-static {v0}, Lokhttp3/internal/http1/Http1ExchangeCodec;->access$500(Lokhttp3/internal/http1/Http1ExchangeCodec;)Lokio/BufferedSource;
move-result-object v0
invoke-interface {v0}, Lokio/BufferedSource;->readHexadecimalUnsignedLong()J
move-result-wide v0
iput-wide v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$ChunkedSource;->bytesRemainingInChunk:J
iget-object v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$ChunkedSource;->this$0:Lokhttp3/internal/http1/Http1ExchangeCodec;
.line 493
invoke-static {v0}, Lokhttp3/internal/http1/Http1ExchangeCodec;->access$500(Lokhttp3/internal/http1/Http1ExchangeCodec;)Lokio/BufferedSource;
move-result-object v0
invoke-interface {v0}, Lokio/BufferedSource;->readUtf8LineStrict()Ljava/lang/String;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/String;->trim()Ljava/lang/String;
move-result-object v0
iget-wide v1, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$ChunkedSource;->bytesRemainingInChunk:J
const-wide/16 v3, 0x0
cmp-long v1, v1, v3
if-ltz v1, :cond_3
.line 494
invoke-virtual {v0}, Ljava/lang/String;->isEmpty()Z
move-result v1
if-nez v1, :cond_1
const-string v1, ";"
invoke-virtual {v0, v1}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
move-result v1
:try_end_0
.catch Ljava/lang/NumberFormatException; {:try_start_0 .. :try_end_0} :catch_0
if-eqz v1, :cond_3
goto :goto_0
:catch_0
move-exception v0
goto :goto_1
:cond_1
:goto_0
iget-wide v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$ChunkedSource;->bytesRemainingInChunk:J
cmp-long v0, v0, v3
if-nez v0, :cond_2
const/4 v0, 0x0
iput-boolean v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$ChunkedSource;->hasMoreChunks:Z
iget-object v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$ChunkedSource;->this$0:Lokhttp3/internal/http1/Http1ExchangeCodec;
.line 503
invoke-static {v0}, Lokhttp3/internal/http1/Http1ExchangeCodec;->access$900(Lokhttp3/internal/http1/Http1ExchangeCodec;)Lokhttp3/Headers;
move-result-object v1
invoke-static {v0, v1}, Lokhttp3/internal/http1/Http1ExchangeCodec;->access$802(Lokhttp3/internal/http1/Http1ExchangeCodec;Lokhttp3/Headers;)Lokhttp3/Headers;
iget-object v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$ChunkedSource;->this$0:Lokhttp3/internal/http1/Http1ExchangeCodec;
.line 504
invoke-static {v0}, Lokhttp3/internal/http1/Http1ExchangeCodec;->access$1000(Lokhttp3/internal/http1/Http1ExchangeCodec;)Lokhttp3/OkHttpClient;
move-result-object v0
invoke-virtual {v0}, Lokhttp3/OkHttpClient;->cookieJar()Lokhttp3/CookieJar;
move-result-object v0
iget-object v1, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$ChunkedSource;->url:Lokhttp3/HttpUrl;
iget-object v2, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$ChunkedSource;->this$0:Lokhttp3/internal/http1/Http1ExchangeCodec;
invoke-static {v2}, Lokhttp3/internal/http1/Http1ExchangeCodec;->access$800(Lokhttp3/internal/http1/Http1ExchangeCodec;)Lokhttp3/Headers;
move-result-object v2
invoke-static {v0, v1, v2}, Lokhttp3/internal/http/HttpHeaders;->receiveHeaders(Lokhttp3/CookieJar;Lokhttp3/HttpUrl;Lokhttp3/Headers;)V
.line 505
invoke-virtual {p0}, Lokhttp3/internal/http1/Http1ExchangeCodec$AbstractSource;->responseBodyComplete()V
:cond_2
return-void
.line 495
:cond_3
:try_start_1
new-instance v1, Ljava/net/ProtocolException;
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
const-string v3, "expected chunk size and optional extensions but was \""
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-wide v3, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$ChunkedSource;->bytesRemainingInChunk:J
invoke-virtual {v2, v3, v4}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string v0, "\""
invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v2}, 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
:try_end_1
.catch Ljava/lang/NumberFormatException; {:try_start_1 .. :try_end_1} :catch_0
.line 499
:goto_1
new-instance v1, Ljava/net/ProtocolException;
invoke-virtual {v0}, Ljava/lang/Throwable;->getMessage()Ljava/lang/String;
move-result-object v0
invoke-direct {v1, v0}, Ljava/net/ProtocolException;-><init>(Ljava/lang/String;)V
throw v1
.end method

View File

@@ -0,0 +1,207 @@
.class public Lokhttp3/internal/http1/Http1ExchangeCodec$FixedLengthSource;
.super Lokhttp3/internal/http1/Http1ExchangeCodec$AbstractSource;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lokhttp3/internal/http1/Http1ExchangeCodec;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1
name = "FixedLengthSource"
.end annotation
# instance fields
.field public bytesRemaining:J
.field public final synthetic this$0:Lokhttp3/internal/http1/Http1ExchangeCodec;
# direct methods
.method public constructor <init>(Lokhttp3/internal/http1/Http1ExchangeCodec;J)V
.locals 2
iput-object p1, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$FixedLengthSource;->this$0:Lokhttp3/internal/http1/Http1ExchangeCodec;
const/4 v0, 0x0
.line 415
invoke-direct {p0, p1, v0}, Lokhttp3/internal/http1/Http1ExchangeCodec$AbstractSource;-><init>(Lokhttp3/internal/http1/Http1ExchangeCodec;Lokhttp3/internal/http1/Http1ExchangeCodec$1;)V
iput-wide p2, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$FixedLengthSource;->bytesRemaining:J
const-wide/16 v0, 0x0
cmp-long p1, p2, v0
if-nez p1, :cond_0
.line 418
invoke-virtual {p0}, Lokhttp3/internal/http1/Http1ExchangeCodec$AbstractSource;->responseBodyComplete()V
:cond_0
return-void
.end method
# virtual methods
.method public close()V
.locals 4
iget-boolean v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$AbstractSource;->closed:Z
if-eqz v0, :cond_0
return-void
:cond_0
iget-wide v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$FixedLengthSource;->bytesRemaining:J
const-wide/16 v2, 0x0
cmp-long v0, v0, v2
if-eqz v0, :cond_1
const/16 v0, 0x64
.line 445
sget-object v1, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit;
invoke-static {p0, v0, v1}, Lokhttp3/internal/Util;->discard(Lokio/Source;ILjava/util/concurrent/TimeUnit;)Z
move-result v0
if-nez v0, :cond_1
iget-object v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$FixedLengthSource;->this$0:Lokhttp3/internal/http1/Http1ExchangeCodec;
.line 446
invoke-static {v0}, Lokhttp3/internal/http1/Http1ExchangeCodec;->access$600(Lokhttp3/internal/http1/Http1ExchangeCodec;)Lokhttp3/internal/connection/RealConnection;
move-result-object v0
invoke-virtual {v0}, Lokhttp3/internal/connection/RealConnection;->noNewExchanges()V
.line 447
invoke-virtual {p0}, Lokhttp3/internal/http1/Http1ExchangeCodec$AbstractSource;->responseBodyComplete()V
:cond_1
const/4 v0, 0x1
iput-boolean v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$AbstractSource;->closed:Z
return-void
.end method
.method public read(Lokio/Buffer;J)J
.locals 7
const-wide/16 v0, 0x0
cmp-long v2, p2, v0
if-ltz v2, :cond_4
iget-boolean v2, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$AbstractSource;->closed:Z
if-nez v2, :cond_3
iget-wide v2, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$FixedLengthSource;->bytesRemaining:J
cmp-long v4, v2, v0
const-wide/16 v5, -0x1
if-nez v4, :cond_0
return-wide v5
.line 427
:cond_0
invoke-static {v2, v3, p2, p3}, Ljava/lang/Math;->min(JJ)J
move-result-wide p2
invoke-super {p0, p1, p2, p3}, Lokhttp3/internal/http1/Http1ExchangeCodec$AbstractSource;->read(Lokio/Buffer;J)J
move-result-wide p1
cmp-long p3, p1, v5
if-eqz p3, :cond_2
iget-wide v2, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$FixedLengthSource;->bytesRemaining:J
sub-long/2addr v2, p1
iput-wide v2, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$FixedLengthSource;->bytesRemaining:J
cmp-long p3, v2, v0
if-nez p3, :cond_1
.line 437
invoke-virtual {p0}, Lokhttp3/internal/http1/Http1ExchangeCodec$AbstractSource;->responseBodyComplete()V
:cond_1
return-wide p1
:cond_2
iget-object p1, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$FixedLengthSource;->this$0:Lokhttp3/internal/http1/Http1ExchangeCodec;
.line 429
invoke-static {p1}, Lokhttp3/internal/http1/Http1ExchangeCodec;->access$600(Lokhttp3/internal/http1/Http1ExchangeCodec;)Lokhttp3/internal/connection/RealConnection;
move-result-object p1
invoke-virtual {p1}, Lokhttp3/internal/connection/RealConnection;->noNewExchanges()V
.line 430
new-instance p1, Ljava/net/ProtocolException;
const-string p2, "unexpected end of stream"
invoke-direct {p1, p2}, Ljava/net/ProtocolException;-><init>(Ljava/lang/String;)V
.line 431
invoke-virtual {p0}, Lokhttp3/internal/http1/Http1ExchangeCodec$AbstractSource;->responseBodyComplete()V
.line 432
throw p1
.line 424
:cond_3
new-instance p1, Ljava/lang/IllegalStateException;
const-string p2, "closed"
invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p1
.line 423
:cond_4
new-instance p1, Ljava/lang/IllegalArgumentException;
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const-string v1, "byteCount < 0: "
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0, p2, p3}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p2
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
.end method

View File

@@ -0,0 +1,165 @@
.class public final Lokhttp3/internal/http1/Http1ExchangeCodec$KnownLengthSink;
.super Ljava/lang/Object;
.source "SourceFile"
# interfaces
.implements Lokio/Sink;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lokhttp3/internal/http1/Http1ExchangeCodec;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x11
name = "KnownLengthSink"
.end annotation
# instance fields
.field public closed:Z
.field public final synthetic this$0:Lokhttp3/internal/http1/Http1ExchangeCodec;
.field public final timeout:Lokio/ForwardingTimeout;
# direct methods
.method public constructor <init>(Lokhttp3/internal/http1/Http1ExchangeCodec;)V
.locals 1
iput-object p1, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$KnownLengthSink;->this$0:Lokhttp3/internal/http1/Http1ExchangeCodec;
.line 313
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 314
new-instance v0, Lokio/ForwardingTimeout;
invoke-static {p1}, Lokhttp3/internal/http1/Http1ExchangeCodec;->access$200(Lokhttp3/internal/http1/Http1ExchangeCodec;)Lokio/BufferedSink;
move-result-object p1
invoke-interface {p1}, Lokio/Sink;->timeout()Lokio/Timeout;
move-result-object p1
invoke-direct {v0, p1}, Lokio/ForwardingTimeout;-><init>(Lokio/Timeout;)V
iput-object v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$KnownLengthSink;->timeout:Lokio/ForwardingTimeout;
return-void
.end method
.method public synthetic constructor <init>(Lokhttp3/internal/http1/Http1ExchangeCodec;Lokhttp3/internal/http1/Http1ExchangeCodec$1;)V
.locals 0
.line 313
invoke-direct {p0, p1}, Lokhttp3/internal/http1/Http1ExchangeCodec$KnownLengthSink;-><init>(Lokhttp3/internal/http1/Http1ExchangeCodec;)V
return-void
.end method
# virtual methods
.method public close()V
.locals 2
iget-boolean v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$KnownLengthSink;->closed:Z
if-eqz v0, :cond_0
return-void
:cond_0
const/4 v0, 0x1
iput-boolean v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$KnownLengthSink;->closed:Z
iget-object v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$KnownLengthSink;->this$0:Lokhttp3/internal/http1/Http1ExchangeCodec;
iget-object v1, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$KnownLengthSink;->timeout:Lokio/ForwardingTimeout;
.line 335
invoke-static {v0, v1}, Lokhttp3/internal/http1/Http1ExchangeCodec;->access$300(Lokhttp3/internal/http1/Http1ExchangeCodec;Lokio/ForwardingTimeout;)V
iget-object v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$KnownLengthSink;->this$0:Lokhttp3/internal/http1/Http1ExchangeCodec;
const/4 v1, 0x3
.line 336
invoke-static {v0, v1}, Lokhttp3/internal/http1/Http1ExchangeCodec;->access$402(Lokhttp3/internal/http1/Http1ExchangeCodec;I)I
return-void
.end method
.method public flush()V
.locals 1
iget-boolean v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$KnownLengthSink;->closed:Z
if-eqz v0, :cond_0
return-void
:cond_0
iget-object v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$KnownLengthSink;->this$0:Lokhttp3/internal/http1/Http1ExchangeCodec;
.line 329
invoke-static {v0}, Lokhttp3/internal/http1/Http1ExchangeCodec;->access$200(Lokhttp3/internal/http1/Http1ExchangeCodec;)Lokio/BufferedSink;
move-result-object v0
invoke-interface {v0}, Lokio/BufferedSink;->flush()V
return-void
.end method
.method public timeout()Lokio/Timeout;
.locals 1
iget-object v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$KnownLengthSink;->timeout:Lokio/ForwardingTimeout;
return-object v0
.end method
.method public write(Lokio/Buffer;J)V
.locals 7
iget-boolean v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$KnownLengthSink;->closed:Z
if-nez v0, :cond_0
.line 323
invoke-virtual {p1}, Lokio/Buffer;->size()J
move-result-wide v1
const-wide/16 v3, 0x0
move-wide v5, p2
invoke-static/range {v1 .. v6}, Lokhttp3/internal/Util;->checkOffsetAndCount(JJJ)V
iget-object v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$KnownLengthSink;->this$0:Lokhttp3/internal/http1/Http1ExchangeCodec;
.line 324
invoke-static {v0}, Lokhttp3/internal/http1/Http1ExchangeCodec;->access$200(Lokhttp3/internal/http1/Http1ExchangeCodec;)Lokio/BufferedSink;
move-result-object v0
invoke-interface {v0, p1, p2, p3}, Lokio/Sink;->write(Lokio/Buffer;J)V
return-void
.line 322
:cond_0
new-instance p1, Ljava/lang/IllegalStateException;
const-string p2, "closed"
invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p1
.end method

View File

@@ -0,0 +1,147 @@
.class public Lokhttp3/internal/http1/Http1ExchangeCodec$UnknownLengthSource;
.super Lokhttp3/internal/http1/Http1ExchangeCodec$AbstractSource;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lokhttp3/internal/http1/Http1ExchangeCodec;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1
name = "UnknownLengthSource"
.end annotation
# instance fields
.field public inputExhausted:Z
.field public final synthetic this$0:Lokhttp3/internal/http1/Http1ExchangeCodec;
# direct methods
.method public constructor <init>(Lokhttp3/internal/http1/Http1ExchangeCodec;)V
.locals 1
iput-object p1, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$UnknownLengthSource;->this$0:Lokhttp3/internal/http1/Http1ExchangeCodec;
const/4 v0, 0x0
.line 520
invoke-direct {p0, p1, v0}, Lokhttp3/internal/http1/Http1ExchangeCodec$AbstractSource;-><init>(Lokhttp3/internal/http1/Http1ExchangeCodec;Lokhttp3/internal/http1/Http1ExchangeCodec$1;)V
return-void
.end method
.method public synthetic constructor <init>(Lokhttp3/internal/http1/Http1ExchangeCodec;Lokhttp3/internal/http1/Http1ExchangeCodec$1;)V
.locals 0
.line 520
invoke-direct {p0, p1}, Lokhttp3/internal/http1/Http1ExchangeCodec$UnknownLengthSource;-><init>(Lokhttp3/internal/http1/Http1ExchangeCodec;)V
return-void
.end method
# virtual methods
.method public close()V
.locals 1
iget-boolean v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$AbstractSource;->closed:Z
if-eqz v0, :cond_0
return-void
:cond_0
iget-boolean v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$UnknownLengthSource;->inputExhausted:Z
if-nez v0, :cond_1
.line 541
invoke-virtual {p0}, Lokhttp3/internal/http1/Http1ExchangeCodec$AbstractSource;->responseBodyComplete()V
:cond_1
const/4 v0, 0x1
iput-boolean v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$AbstractSource;->closed:Z
return-void
.end method
.method public read(Lokio/Buffer;J)J
.locals 3
const-wide/16 v0, 0x0
cmp-long v0, p2, v0
if-ltz v0, :cond_3
iget-boolean v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$AbstractSource;->closed:Z
if-nez v0, :cond_2
iget-boolean v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$UnknownLengthSource;->inputExhausted:Z
const-wide/16 v1, -0x1
if-eqz v0, :cond_0
return-wide v1
.line 529
:cond_0
invoke-super {p0, p1, p2, p3}, Lokhttp3/internal/http1/Http1ExchangeCodec$AbstractSource;->read(Lokio/Buffer;J)J
move-result-wide p1
cmp-long p3, p1, v1
if-nez p3, :cond_1
const/4 p1, 0x1
iput-boolean p1, p0, Lokhttp3/internal/http1/Http1ExchangeCodec$UnknownLengthSource;->inputExhausted:Z
.line 532
invoke-virtual {p0}, Lokhttp3/internal/http1/Http1ExchangeCodec$AbstractSource;->responseBodyComplete()V
return-wide v1
:cond_1
return-wide p1
.line 526
:cond_2
new-instance p1, Ljava/lang/IllegalStateException;
const-string p2, "closed"
invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p1
.line 525
:cond_3
new-instance p1, Ljava/lang/IllegalArgumentException;
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const-string v1, "byteCount < 0: "
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0, p2, p3}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p2
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
.end method

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,14 @@
.class public final Lokhttp3/internal/http2/ConnectionShutdownException;
.super Ljava/io/IOException;
.source "SourceFile"
# direct methods
.method public constructor <init>()V
.locals 0
.line 24
invoke-direct {p0}, Ljava/io/IOException;-><init>()V
return-void
.end method

View File

@@ -0,0 +1,261 @@
.class public final enum Lokhttp3/internal/http2/ErrorCode;
.super Ljava/lang/Enum;
.source "SourceFile"
# static fields
.field private static final synthetic $VALUES:[Lokhttp3/internal/http2/ErrorCode;
.field public static final enum CANCEL:Lokhttp3/internal/http2/ErrorCode;
.field public static final enum COMPRESSION_ERROR:Lokhttp3/internal/http2/ErrorCode;
.field public static final enum CONNECT_ERROR:Lokhttp3/internal/http2/ErrorCode;
.field public static final enum ENHANCE_YOUR_CALM:Lokhttp3/internal/http2/ErrorCode;
.field public static final enum FLOW_CONTROL_ERROR:Lokhttp3/internal/http2/ErrorCode;
.field public static final enum HTTP_1_1_REQUIRED:Lokhttp3/internal/http2/ErrorCode;
.field public static final enum INADEQUATE_SECURITY:Lokhttp3/internal/http2/ErrorCode;
.field public static final enum INTERNAL_ERROR:Lokhttp3/internal/http2/ErrorCode;
.field public static final enum NO_ERROR:Lokhttp3/internal/http2/ErrorCode;
.field public static final enum PROTOCOL_ERROR:Lokhttp3/internal/http2/ErrorCode;
.field public static final enum REFUSED_STREAM:Lokhttp3/internal/http2/ErrorCode;
# instance fields
.field public final httpCode:I
# direct methods
.method static constructor <clinit>()V
.locals 14
.line 21
new-instance v0, Lokhttp3/internal/http2/ErrorCode;
const-string v1, "NO_ERROR"
const/4 v2, 0x0
invoke-direct {v0, v1, v2, v2}, Lokhttp3/internal/http2/ErrorCode;-><init>(Ljava/lang/String;II)V
sput-object v0, Lokhttp3/internal/http2/ErrorCode;->NO_ERROR:Lokhttp3/internal/http2/ErrorCode;
.line 23
new-instance v1, Lokhttp3/internal/http2/ErrorCode;
const-string v2, "PROTOCOL_ERROR"
const/4 v3, 0x1
invoke-direct {v1, v2, v3, v3}, Lokhttp3/internal/http2/ErrorCode;-><init>(Ljava/lang/String;II)V
sput-object v1, Lokhttp3/internal/http2/ErrorCode;->PROTOCOL_ERROR:Lokhttp3/internal/http2/ErrorCode;
.line 25
new-instance v2, Lokhttp3/internal/http2/ErrorCode;
const-string v3, "INTERNAL_ERROR"
const/4 v4, 0x2
invoke-direct {v2, v3, v4, v4}, Lokhttp3/internal/http2/ErrorCode;-><init>(Ljava/lang/String;II)V
sput-object v2, Lokhttp3/internal/http2/ErrorCode;->INTERNAL_ERROR:Lokhttp3/internal/http2/ErrorCode;
.line 27
new-instance v3, Lokhttp3/internal/http2/ErrorCode;
const-string v4, "FLOW_CONTROL_ERROR"
const/4 v5, 0x3
invoke-direct {v3, v4, v5, v5}, Lokhttp3/internal/http2/ErrorCode;-><init>(Ljava/lang/String;II)V
sput-object v3, Lokhttp3/internal/http2/ErrorCode;->FLOW_CONTROL_ERROR:Lokhttp3/internal/http2/ErrorCode;
.line 29
new-instance v4, Lokhttp3/internal/http2/ErrorCode;
const-string v5, "REFUSED_STREAM"
const/4 v6, 0x4
const/4 v7, 0x7
invoke-direct {v4, v5, v6, v7}, Lokhttp3/internal/http2/ErrorCode;-><init>(Ljava/lang/String;II)V
sput-object v4, Lokhttp3/internal/http2/ErrorCode;->REFUSED_STREAM:Lokhttp3/internal/http2/ErrorCode;
.line 31
new-instance v5, Lokhttp3/internal/http2/ErrorCode;
const-string v6, "CANCEL"
const/4 v8, 0x5
const/16 v9, 0x8
invoke-direct {v5, v6, v8, v9}, Lokhttp3/internal/http2/ErrorCode;-><init>(Ljava/lang/String;II)V
sput-object v5, Lokhttp3/internal/http2/ErrorCode;->CANCEL:Lokhttp3/internal/http2/ErrorCode;
.line 33
new-instance v6, Lokhttp3/internal/http2/ErrorCode;
const-string v8, "COMPRESSION_ERROR"
const/4 v10, 0x6
const/16 v11, 0x9
invoke-direct {v6, v8, v10, v11}, Lokhttp3/internal/http2/ErrorCode;-><init>(Ljava/lang/String;II)V
sput-object v6, Lokhttp3/internal/http2/ErrorCode;->COMPRESSION_ERROR:Lokhttp3/internal/http2/ErrorCode;
.line 35
new-instance v8, Lokhttp3/internal/http2/ErrorCode;
const-string v10, "CONNECT_ERROR"
const/16 v12, 0xa
invoke-direct {v8, v10, v7, v12}, Lokhttp3/internal/http2/ErrorCode;-><init>(Ljava/lang/String;II)V
sput-object v8, Lokhttp3/internal/http2/ErrorCode;->CONNECT_ERROR:Lokhttp3/internal/http2/ErrorCode;
.line 37
new-instance v10, Lokhttp3/internal/http2/ErrorCode;
const-string v7, "ENHANCE_YOUR_CALM"
const/16 v13, 0xb
invoke-direct {v10, v7, v9, v13}, Lokhttp3/internal/http2/ErrorCode;-><init>(Ljava/lang/String;II)V
sput-object v10, Lokhttp3/internal/http2/ErrorCode;->ENHANCE_YOUR_CALM:Lokhttp3/internal/http2/ErrorCode;
.line 39
new-instance v9, Lokhttp3/internal/http2/ErrorCode;
const-string v7, "INADEQUATE_SECURITY"
const/16 v13, 0xc
invoke-direct {v9, v7, v11, v13}, Lokhttp3/internal/http2/ErrorCode;-><init>(Ljava/lang/String;II)V
sput-object v9, Lokhttp3/internal/http2/ErrorCode;->INADEQUATE_SECURITY:Lokhttp3/internal/http2/ErrorCode;
.line 41
new-instance v11, Lokhttp3/internal/http2/ErrorCode;
const-string v7, "HTTP_1_1_REQUIRED"
const/16 v13, 0xd
invoke-direct {v11, v7, v12, v13}, Lokhttp3/internal/http2/ErrorCode;-><init>(Ljava/lang/String;II)V
sput-object v11, Lokhttp3/internal/http2/ErrorCode;->HTTP_1_1_REQUIRED:Lokhttp3/internal/http2/ErrorCode;
move-object v7, v8
move-object v8, v10
move-object v10, v11
filled-new-array/range {v0 .. v10}, [Lokhttp3/internal/http2/ErrorCode;
move-result-object v0
sput-object v0, Lokhttp3/internal/http2/ErrorCode;->$VALUES:[Lokhttp3/internal/http2/ErrorCode;
return-void
.end method
.method private constructor <init>(Ljava/lang/String;II)V
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"(I)V"
}
.end annotation
.line 45
invoke-direct {p0, p1, p2}, Ljava/lang/Enum;-><init>(Ljava/lang/String;I)V
iput p3, p0, Lokhttp3/internal/http2/ErrorCode;->httpCode:I
return-void
.end method
.method public static fromHttp2(I)Lokhttp3/internal/http2/ErrorCode;
.locals 5
.line 50
invoke-static {}, Lokhttp3/internal/http2/ErrorCode;->values()[Lokhttp3/internal/http2/ErrorCode;
move-result-object v0
array-length v1, v0
const/4 v2, 0x0
:goto_0
if-ge v2, v1, :cond_1
aget-object v3, v0, v2
.line 51
iget v4, v3, Lokhttp3/internal/http2/ErrorCode;->httpCode:I
if-ne v4, p0, :cond_0
return-object v3
:cond_0
add-int/lit8 v2, v2, 0x1
goto :goto_0
:cond_1
const/4 p0, 0x0
return-object p0
.end method
.method public static valueOf(Ljava/lang/String;)Lokhttp3/internal/http2/ErrorCode;
.locals 1
const-class v0, Lokhttp3/internal/http2/ErrorCode;
.line 19
invoke-static {v0, p0}, Ljava/lang/Enum;->valueOf(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Enum;
move-result-object p0
check-cast p0, Lokhttp3/internal/http2/ErrorCode;
return-object p0
.end method
.method public static values()[Lokhttp3/internal/http2/ErrorCode;
.locals 1
sget-object v0, Lokhttp3/internal/http2/ErrorCode;->$VALUES:[Lokhttp3/internal/http2/ErrorCode;
.line 19
invoke-virtual {v0}, [Lokhttp3/internal/http2/ErrorCode;->clone()Ljava/lang/Object;
move-result-object v0
check-cast v0, [Lokhttp3/internal/http2/ErrorCode;
return-object v0
.end method

View File

@@ -0,0 +1,245 @@
.class public final Lokhttp3/internal/http2/Header;
.super Ljava/lang/Object;
.source "SourceFile"
# static fields
.field public static final PSEUDO_PREFIX:Lokio/ByteString;
.field public static final RESPONSE_STATUS:Lokio/ByteString;
.field public static final TARGET_AUTHORITY:Lokio/ByteString;
.field public static final TARGET_METHOD:Lokio/ByteString;
.field public static final TARGET_PATH:Lokio/ByteString;
.field public static final TARGET_SCHEME:Lokio/ByteString;
# instance fields
.field public final hpackSize:I
.field public final name:Lokio/ByteString;
.field public final value:Lokio/ByteString;
# direct methods
.method static constructor <clinit>()V
.locals 1
const-string v0, ":"
.line 24
invoke-static {v0}, Lokio/ByteString;->encodeUtf8(Ljava/lang/String;)Lokio/ByteString;
move-result-object v0
sput-object v0, Lokhttp3/internal/http2/Header;->PSEUDO_PREFIX:Lokio/ByteString;
const-string v0, ":status"
.line 32
invoke-static {v0}, Lokio/ByteString;->encodeUtf8(Ljava/lang/String;)Lokio/ByteString;
move-result-object v0
sput-object v0, Lokhttp3/internal/http2/Header;->RESPONSE_STATUS:Lokio/ByteString;
const-string v0, ":method"
.line 33
invoke-static {v0}, Lokio/ByteString;->encodeUtf8(Ljava/lang/String;)Lokio/ByteString;
move-result-object v0
sput-object v0, Lokhttp3/internal/http2/Header;->TARGET_METHOD:Lokio/ByteString;
const-string v0, ":path"
.line 34
invoke-static {v0}, Lokio/ByteString;->encodeUtf8(Ljava/lang/String;)Lokio/ByteString;
move-result-object v0
sput-object v0, Lokhttp3/internal/http2/Header;->TARGET_PATH:Lokio/ByteString;
const-string v0, ":scheme"
.line 35
invoke-static {v0}, Lokio/ByteString;->encodeUtf8(Ljava/lang/String;)Lokio/ByteString;
move-result-object v0
sput-object v0, Lokhttp3/internal/http2/Header;->TARGET_SCHEME:Lokio/ByteString;
const-string v0, ":authority"
.line 36
invoke-static {v0}, Lokio/ByteString;->encodeUtf8(Ljava/lang/String;)Lokio/ByteString;
move-result-object v0
sput-object v0, Lokhttp3/internal/http2/Header;->TARGET_AUTHORITY:Lokio/ByteString;
return-void
.end method
.method public constructor <init>(Ljava/lang/String;Ljava/lang/String;)V
.locals 0
.line 47
invoke-static {p1}, Lokio/ByteString;->encodeUtf8(Ljava/lang/String;)Lokio/ByteString;
move-result-object p1
invoke-static {p2}, Lokio/ByteString;->encodeUtf8(Ljava/lang/String;)Lokio/ByteString;
move-result-object p2
invoke-direct {p0, p1, p2}, Lokhttp3/internal/http2/Header;-><init>(Lokio/ByteString;Lokio/ByteString;)V
return-void
.end method
.method public constructor <init>(Lokio/ByteString;Ljava/lang/String;)V
.locals 0
.line 51
invoke-static {p2}, Lokio/ByteString;->encodeUtf8(Ljava/lang/String;)Lokio/ByteString;
move-result-object p2
invoke-direct {p0, p1, p2}, Lokhttp3/internal/http2/Header;-><init>(Lokio/ByteString;Lokio/ByteString;)V
return-void
.end method
.method public constructor <init>(Lokio/ByteString;Lokio/ByteString;)V
.locals 0
.line 54
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Lokhttp3/internal/http2/Header;->name:Lokio/ByteString;
iput-object p2, p0, Lokhttp3/internal/http2/Header;->value:Lokio/ByteString;
.line 57
invoke-virtual {p1}, Lokio/ByteString;->size()I
move-result p1
add-int/lit8 p1, p1, 0x20
invoke-virtual {p2}, Lokio/ByteString;->size()I
move-result p2
add-int/2addr p1, p2
iput p1, p0, Lokhttp3/internal/http2/Header;->hpackSize:I
return-void
.end method
# virtual methods
.method public equals(Ljava/lang/Object;)Z
.locals 3
.line 61
instance-of v0, p1, Lokhttp3/internal/http2/Header;
const/4 v1, 0x0
if-eqz v0, :cond_0
.line 62
check-cast p1, Lokhttp3/internal/http2/Header;
iget-object v0, p0, Lokhttp3/internal/http2/Header;->name:Lokio/ByteString;
.line 63
iget-object v2, p1, Lokhttp3/internal/http2/Header;->name:Lokio/ByteString;
invoke-virtual {v0, v2}, Lokio/ByteString;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_0
iget-object v0, p0, Lokhttp3/internal/http2/Header;->value:Lokio/ByteString;
iget-object p1, p1, Lokhttp3/internal/http2/Header;->value:Lokio/ByteString;
.line 64
invoke-virtual {v0, p1}, Lokio/ByteString;->equals(Ljava/lang/Object;)Z
move-result p1
if-eqz p1, :cond_0
const/4 v1, 0x1
:cond_0
return v1
.end method
.method public hashCode()I
.locals 2
iget-object v0, p0, Lokhttp3/internal/http2/Header;->name:Lokio/ByteString;
.line 71
invoke-virtual {v0}, Lokio/ByteString;->hashCode()I
move-result v0
const/16 v1, 0x20f
add-int/2addr v1, v0
mul-int/lit8 v1, v1, 0x1f
iget-object v0, p0, Lokhttp3/internal/http2/Header;->value:Lokio/ByteString;
.line 72
invoke-virtual {v0}, Lokio/ByteString;->hashCode()I
move-result v0
add-int/2addr v1, v0
return v1
.end method
.method public toString()Ljava/lang/String;
.locals 2
iget-object v0, p0, Lokhttp3/internal/http2/Header;->name:Lokio/ByteString;
.line 77
invoke-virtual {v0}, Lokio/ByteString;->utf8()Ljava/lang/String;
move-result-object v0
iget-object v1, p0, Lokhttp3/internal/http2/Header;->value:Lokio/ByteString;
invoke-virtual {v1}, Lokio/ByteString;->utf8()Ljava/lang/String;
move-result-object v1
filled-new-array {v0, v1}, [Ljava/lang/Object;
move-result-object v0
const-string v1, "%s: %s"
invoke-static {v1, v0}, Lokhttp3/internal/Util;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object v0
return-object v0
.end method

View File

@@ -0,0 +1,956 @@
.class public final Lokhttp3/internal/http2/Hpack$Reader;
.super Ljava/lang/Object;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lokhttp3/internal/http2/Hpack;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "Reader"
.end annotation
# instance fields
.field public dynamicTable:[Lokhttp3/internal/http2/Header;
.field public dynamicTableByteCount:I
.field public headerCount:I
.field public final headerList:Ljava/util/List;
.field public final headerTableSizeSetting:I
.field public maxDynamicTableByteCount:I
.field public nextHeaderIndex:I
.field public final source:Lokio/BufferedSource;
# direct methods
.method public constructor <init>(IILokio/Source;)V
.locals 1
.line 134
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 117
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
iput-object v0, p0, Lokhttp3/internal/http2/Hpack$Reader;->headerList:Ljava/util/List;
const/16 v0, 0x8
new-array v0, v0, [Lokhttp3/internal/http2/Header;
iput-object v0, p0, Lokhttp3/internal/http2/Hpack$Reader;->dynamicTable:[Lokhttp3/internal/http2/Header;
array-length v0, v0
add-int/lit8 v0, v0, -0x1
iput v0, p0, Lokhttp3/internal/http2/Hpack$Reader;->nextHeaderIndex:I
const/4 v0, 0x0
iput v0, p0, Lokhttp3/internal/http2/Hpack$Reader;->headerCount:I
iput v0, p0, Lokhttp3/internal/http2/Hpack$Reader;->dynamicTableByteCount:I
iput p1, p0, Lokhttp3/internal/http2/Hpack$Reader;->headerTableSizeSetting:I
iput p2, p0, Lokhttp3/internal/http2/Hpack$Reader;->maxDynamicTableByteCount:I
.line 137
invoke-static {p3}, Lokio/Okio;->buffer(Lokio/Source;)Lokio/BufferedSource;
move-result-object p1
iput-object p1, p0, Lokhttp3/internal/http2/Hpack$Reader;->source:Lokio/BufferedSource;
return-void
.end method
.method public constructor <init>(ILokio/Source;)V
.locals 0
.line 131
invoke-direct {p0, p1, p1, p2}, Lokhttp3/internal/http2/Hpack$Reader;-><init>(IILokio/Source;)V
return-void
.end method
# virtual methods
.method public final adjustDynamicTableByteCount()V
.locals 2
iget v0, p0, Lokhttp3/internal/http2/Hpack$Reader;->maxDynamicTableByteCount:I
iget v1, p0, Lokhttp3/internal/http2/Hpack$Reader;->dynamicTableByteCount:I
if-ge v0, v1, :cond_1
if-nez v0, :cond_0
.line 147
invoke-virtual {p0}, Lokhttp3/internal/http2/Hpack$Reader;->clearDynamicTable()V
goto :goto_0
:cond_0
sub-int/2addr v1, v0
.line 149
invoke-virtual {p0, v1}, Lokhttp3/internal/http2/Hpack$Reader;->evictToRecoverBytes(I)I
:cond_1
:goto_0
return-void
.end method
.method public final clearDynamicTable()V
.locals 2
iget-object v0, p0, Lokhttp3/internal/http2/Hpack$Reader;->dynamicTable:[Lokhttp3/internal/http2/Header;
const/4 v1, 0x0
.line 155
invoke-static {v0, v1}, Ljava/util/Arrays;->fill([Ljava/lang/Object;Ljava/lang/Object;)V
iget-object v0, p0, Lokhttp3/internal/http2/Hpack$Reader;->dynamicTable:[Lokhttp3/internal/http2/Header;
.line 156
array-length v0, v0
add-int/lit8 v0, v0, -0x1
iput v0, p0, Lokhttp3/internal/http2/Hpack$Reader;->nextHeaderIndex:I
const/4 v0, 0x0
iput v0, p0, Lokhttp3/internal/http2/Hpack$Reader;->headerCount:I
iput v0, p0, Lokhttp3/internal/http2/Hpack$Reader;->dynamicTableByteCount:I
return-void
.end method
.method public final dynamicTableIndex(I)I
.locals 1
iget v0, p0, Lokhttp3/internal/http2/Hpack$Reader;->nextHeaderIndex:I
add-int/lit8 v0, v0, 0x1
add-int/2addr v0, p1
return v0
.end method
.method public final evictToRecoverBytes(I)I
.locals 4
const/4 v0, 0x0
if-lez p1, :cond_1
iget-object v1, p0, Lokhttp3/internal/http2/Hpack$Reader;->dynamicTable:[Lokhttp3/internal/http2/Header;
.line 166
array-length v1, v1
add-int/lit8 v1, v1, -0x1
:goto_0
iget v2, p0, Lokhttp3/internal/http2/Hpack$Reader;->nextHeaderIndex:I
if-lt v1, v2, :cond_0
if-lez p1, :cond_0
iget-object v2, p0, Lokhttp3/internal/http2/Hpack$Reader;->dynamicTable:[Lokhttp3/internal/http2/Header;
.line 167
aget-object v2, v2, v1
iget v2, v2, Lokhttp3/internal/http2/Header;->hpackSize:I
sub-int/2addr p1, v2
iget v3, p0, Lokhttp3/internal/http2/Hpack$Reader;->dynamicTableByteCount:I
sub-int/2addr v3, v2
iput v3, p0, Lokhttp3/internal/http2/Hpack$Reader;->dynamicTableByteCount:I
iget v2, p0, Lokhttp3/internal/http2/Hpack$Reader;->headerCount:I
add-int/lit8 v2, v2, -0x1
iput v2, p0, Lokhttp3/internal/http2/Hpack$Reader;->headerCount:I
add-int/lit8 v0, v0, 0x1
add-int/lit8 v1, v1, -0x1
goto :goto_0
:cond_0
iget-object p1, p0, Lokhttp3/internal/http2/Hpack$Reader;->dynamicTable:[Lokhttp3/internal/http2/Header;
add-int/lit8 v1, v2, 0x1
add-int/lit8 v2, v2, 0x1
add-int/2addr v2, v0
iget v3, p0, Lokhttp3/internal/http2/Hpack$Reader;->headerCount:I
.line 172
invoke-static {p1, v1, p1, v2, v3}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
iget p1, p0, Lokhttp3/internal/http2/Hpack$Reader;->nextHeaderIndex:I
add-int/2addr p1, v0
iput p1, p0, Lokhttp3/internal/http2/Hpack$Reader;->nextHeaderIndex:I
:cond_1
return v0
.end method
.method public getAndResetHeaderList()Ljava/util/List;
.locals 2
.line 213
new-instance v0, Ljava/util/ArrayList;
iget-object v1, p0, Lokhttp3/internal/http2/Hpack$Reader;->headerList:Ljava/util/List;
invoke-direct {v0, v1}, Ljava/util/ArrayList;-><init>(Ljava/util/Collection;)V
iget-object v1, p0, Lokhttp3/internal/http2/Hpack$Reader;->headerList:Ljava/util/List;
.line 214
invoke-interface {v1}, Ljava/util/List;->clear()V
return-object v0
.end method
.method public final getName(I)Lokio/ByteString;
.locals 3
.line 262
invoke-virtual {p0, p1}, Lokhttp3/internal/http2/Hpack$Reader;->isStaticHeader(I)Z
move-result v0
if-eqz v0, :cond_0
.line 263
sget-object v0, Lokhttp3/internal/http2/Hpack;->STATIC_HEADER_TABLE:[Lokhttp3/internal/http2/Header;
aget-object p1, v0, p1
iget-object p1, p1, Lokhttp3/internal/http2/Header;->name:Lokio/ByteString;
return-object p1
.line 265
:cond_0
sget-object v0, Lokhttp3/internal/http2/Hpack;->STATIC_HEADER_TABLE:[Lokhttp3/internal/http2/Header;
array-length v0, v0
sub-int v0, p1, v0
invoke-virtual {p0, v0}, Lokhttp3/internal/http2/Hpack$Reader;->dynamicTableIndex(I)I
move-result v0
if-ltz v0, :cond_1
iget-object v1, p0, Lokhttp3/internal/http2/Hpack$Reader;->dynamicTable:[Lokhttp3/internal/http2/Header;
.line 266
array-length v2, v1
if-ge v0, v2, :cond_1
.line 270
aget-object p1, v1, v0
iget-object p1, p1, Lokhttp3/internal/http2/Header;->name:Lokio/ByteString;
return-object p1
.line 267
:cond_1
new-instance v0, Ljava/io/IOException;
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "Header index too large "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
add-int/lit8 p1, p1, 0x1
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {v0, p1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
throw v0
.end method
.method public final insertIntoDynamicTable(ILokhttp3/internal/http2/Header;)V
.locals 5
iget-object v0, p0, Lokhttp3/internal/http2/Hpack$Reader;->headerList:Ljava/util/List;
.line 280
invoke-interface {v0, p2}, Ljava/util/List;->add(Ljava/lang/Object;)Z
.line 282
iget v0, p2, Lokhttp3/internal/http2/Header;->hpackSize:I
const/4 v1, -0x1
if-eq p1, v1, :cond_0
iget-object v2, p0, Lokhttp3/internal/http2/Hpack$Reader;->dynamicTable:[Lokhttp3/internal/http2/Header;
.line 284
invoke-virtual {p0, p1}, Lokhttp3/internal/http2/Hpack$Reader;->dynamicTableIndex(I)I
move-result v3
aget-object v2, v2, v3
iget v2, v2, Lokhttp3/internal/http2/Header;->hpackSize:I
sub-int/2addr v0, v2
:cond_0
iget v2, p0, Lokhttp3/internal/http2/Hpack$Reader;->maxDynamicTableByteCount:I
if-le v0, v2, :cond_1
.line 289
invoke-virtual {p0}, Lokhttp3/internal/http2/Hpack$Reader;->clearDynamicTable()V
return-void
:cond_1
iget v3, p0, Lokhttp3/internal/http2/Hpack$Reader;->dynamicTableByteCount:I
add-int/2addr v3, v0
sub-int/2addr v3, v2
.line 295
invoke-virtual {p0, v3}, Lokhttp3/internal/http2/Hpack$Reader;->evictToRecoverBytes(I)I
move-result v2
if-ne p1, v1, :cond_3
iget p1, p0, Lokhttp3/internal/http2/Hpack$Reader;->headerCount:I
add-int/lit8 p1, p1, 0x1
iget-object v1, p0, Lokhttp3/internal/http2/Hpack$Reader;->dynamicTable:[Lokhttp3/internal/http2/Header;
.line 298
array-length v2, v1
if-le p1, v2, :cond_2
.line 299
array-length p1, v1
mul-int/lit8 p1, p1, 0x2
new-array p1, p1, [Lokhttp3/internal/http2/Header;
.line 300
array-length v2, v1
array-length v3, v1
const/4 v4, 0x0
invoke-static {v1, v4, p1, v2, v3}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
iget-object v1, p0, Lokhttp3/internal/http2/Hpack$Reader;->dynamicTable:[Lokhttp3/internal/http2/Header;
.line 301
array-length v1, v1
add-int/lit8 v1, v1, -0x1
iput v1, p0, Lokhttp3/internal/http2/Hpack$Reader;->nextHeaderIndex:I
iput-object p1, p0, Lokhttp3/internal/http2/Hpack$Reader;->dynamicTable:[Lokhttp3/internal/http2/Header;
:cond_2
iget p1, p0, Lokhttp3/internal/http2/Hpack$Reader;->nextHeaderIndex:I
add-int/lit8 v1, p1, -0x1
iput v1, p0, Lokhttp3/internal/http2/Hpack$Reader;->nextHeaderIndex:I
iget-object v1, p0, Lokhttp3/internal/http2/Hpack$Reader;->dynamicTable:[Lokhttp3/internal/http2/Header;
.line 305
aput-object p2, v1, p1
iget p1, p0, Lokhttp3/internal/http2/Hpack$Reader;->headerCount:I
add-int/lit8 p1, p1, 0x1
iput p1, p0, Lokhttp3/internal/http2/Hpack$Reader;->headerCount:I
goto :goto_0
.line 308
:cond_3
invoke-virtual {p0, p1}, Lokhttp3/internal/http2/Hpack$Reader;->dynamicTableIndex(I)I
move-result v1
add-int/2addr v1, v2
add-int/2addr p1, v1
iget-object v1, p0, Lokhttp3/internal/http2/Hpack$Reader;->dynamicTable:[Lokhttp3/internal/http2/Header;
.line 309
aput-object p2, v1, p1
:goto_0
iget p1, p0, Lokhttp3/internal/http2/Hpack$Reader;->dynamicTableByteCount:I
add-int/2addr p1, v0
iput p1, p0, Lokhttp3/internal/http2/Hpack$Reader;->dynamicTableByteCount:I
return-void
.end method
.method public final isStaticHeader(I)Z
.locals 2
if-ltz p1, :cond_0
.line 275
sget-object v0, Lokhttp3/internal/http2/Hpack;->STATIC_HEADER_TABLE:[Lokhttp3/internal/http2/Header;
array-length v0, v0
const/4 v1, 0x1
sub-int/2addr v0, v1
if-gt p1, v0, :cond_0
goto :goto_0
:cond_0
const/4 v1, 0x0
:goto_0
return v1
.end method
.method public final readByte()I
.locals 1
iget-object v0, p0, Lokhttp3/internal/http2/Hpack$Reader;->source:Lokio/BufferedSource;
.line 315
invoke-interface {v0}, Lokio/BufferedSource;->readByte()B
move-result v0
and-int/lit16 v0, v0, 0xff
return v0
.end method
.method public readByteString()Lokio/ByteString;
.locals 5
.line 342
invoke-virtual {p0}, Lokhttp3/internal/http2/Hpack$Reader;->readByte()I
move-result v0
and-int/lit16 v1, v0, 0x80
const/16 v2, 0x80
if-ne v1, v2, :cond_0
const/4 v1, 0x1
goto :goto_0
:cond_0
const/4 v1, 0x0
:goto_0
const/16 v2, 0x7f
.line 344
invoke-virtual {p0, v0, v2}, Lokhttp3/internal/http2/Hpack$Reader;->readInt(II)I
move-result v0
if-eqz v1, :cond_1
.line 347
invoke-static {}, Lokhttp3/internal/http2/Huffman;->get()Lokhttp3/internal/http2/Huffman;
move-result-object v1
iget-object v2, p0, Lokhttp3/internal/http2/Hpack$Reader;->source:Lokio/BufferedSource;
int-to-long v3, v0
invoke-interface {v2, v3, v4}, Lokio/BufferedSource;->readByteArray(J)[B
move-result-object v0
invoke-virtual {v1, v0}, Lokhttp3/internal/http2/Huffman;->decode([B)[B
move-result-object v0
invoke-static {v0}, Lokio/ByteString;->of([B)Lokio/ByteString;
move-result-object v0
return-object v0
:cond_1
iget-object v1, p0, Lokhttp3/internal/http2/Hpack$Reader;->source:Lokio/BufferedSource;
int-to-long v2, v0
.line 349
invoke-interface {v1, v2, v3}, Lokio/BufferedSource;->readByteString(J)Lokio/ByteString;
move-result-object v0
return-object v0
.end method
.method public readHeaders()V
.locals 4
:goto_0
iget-object v0, p0, Lokhttp3/internal/http2/Hpack$Reader;->source:Lokio/BufferedSource;
.line 184
invoke-interface {v0}, Lokio/BufferedSource;->exhausted()Z
move-result v0
if-nez v0, :cond_8
iget-object v0, p0, Lokhttp3/internal/http2/Hpack$Reader;->source:Lokio/BufferedSource;
.line 185
invoke-interface {v0}, Lokio/BufferedSource;->readByte()B
move-result v0
and-int/lit16 v1, v0, 0xff
const/16 v2, 0x80
if-eq v1, v2, :cond_7
and-int/lit16 v3, v0, 0x80
if-ne v3, v2, :cond_0
const/16 v0, 0x7f
.line 189
invoke-virtual {p0, v1, v0}, Lokhttp3/internal/http2/Hpack$Reader;->readInt(II)I
move-result v0
add-int/lit8 v0, v0, -0x1
.line 190
invoke-virtual {p0, v0}, Lokhttp3/internal/http2/Hpack$Reader;->readIndexedHeader(I)V
goto :goto_0
:cond_0
const/16 v2, 0x40
if-ne v1, v2, :cond_1
.line 192
invoke-virtual {p0}, Lokhttp3/internal/http2/Hpack$Reader;->readLiteralHeaderWithIncrementalIndexingNewName()V
goto :goto_0
:cond_1
and-int/lit8 v3, v0, 0x40
if-ne v3, v2, :cond_2
const/16 v0, 0x3f
.line 194
invoke-virtual {p0, v1, v0}, Lokhttp3/internal/http2/Hpack$Reader;->readInt(II)I
move-result v0
add-int/lit8 v0, v0, -0x1
.line 195
invoke-virtual {p0, v0}, Lokhttp3/internal/http2/Hpack$Reader;->readLiteralHeaderWithIncrementalIndexingIndexedName(I)V
goto :goto_0
:cond_2
and-int/lit8 v0, v0, 0x20
const/16 v2, 0x20
if-ne v0, v2, :cond_4
const/16 v0, 0x1f
.line 197
invoke-virtual {p0, v1, v0}, Lokhttp3/internal/http2/Hpack$Reader;->readInt(II)I
move-result v0
iput v0, p0, Lokhttp3/internal/http2/Hpack$Reader;->maxDynamicTableByteCount:I
if-ltz v0, :cond_3
iget v1, p0, Lokhttp3/internal/http2/Hpack$Reader;->headerTableSizeSetting:I
if-gt v0, v1, :cond_3
.line 202
invoke-virtual {p0}, Lokhttp3/internal/http2/Hpack$Reader;->adjustDynamicTableByteCount()V
goto :goto_0
.line 200
:cond_3
new-instance v0, Ljava/io/IOException;
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "Invalid dynamic table size update "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget v2, p0, Lokhttp3/internal/http2/Hpack$Reader;->maxDynamicTableByteCount:I
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-direct {v0, v1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
throw v0
:cond_4
const/16 v0, 0x10
if-eq v1, v0, :cond_6
if-nez v1, :cond_5
goto :goto_1
:cond_5
const/16 v0, 0xf
.line 206
invoke-virtual {p0, v1, v0}, Lokhttp3/internal/http2/Hpack$Reader;->readInt(II)I
move-result v0
add-int/lit8 v0, v0, -0x1
.line 207
invoke-virtual {p0, v0}, Lokhttp3/internal/http2/Hpack$Reader;->readLiteralHeaderWithoutIndexingIndexedName(I)V
goto :goto_0
.line 204
:cond_6
:goto_1
invoke-virtual {p0}, Lokhttp3/internal/http2/Hpack$Reader;->readLiteralHeaderWithoutIndexingNewName()V
goto/16 :goto_0
.line 187
:cond_7
new-instance v0, Ljava/io/IOException;
const-string v1, "index == 0"
invoke-direct {v0, v1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
throw v0
:cond_8
return-void
.end method
.method public final readIndexedHeader(I)V
.locals 3
.line 219
invoke-virtual {p0, p1}, Lokhttp3/internal/http2/Hpack$Reader;->isStaticHeader(I)Z
move-result v0
if-eqz v0, :cond_0
.line 220
sget-object v0, Lokhttp3/internal/http2/Hpack;->STATIC_HEADER_TABLE:[Lokhttp3/internal/http2/Header;
aget-object p1, v0, p1
iget-object v0, p0, Lokhttp3/internal/http2/Hpack$Reader;->headerList:Ljava/util/List;
.line 221
invoke-interface {v0, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
goto :goto_0
.line 223
:cond_0
sget-object v0, Lokhttp3/internal/http2/Hpack;->STATIC_HEADER_TABLE:[Lokhttp3/internal/http2/Header;
array-length v0, v0
sub-int v0, p1, v0
invoke-virtual {p0, v0}, Lokhttp3/internal/http2/Hpack$Reader;->dynamicTableIndex(I)I
move-result v0
if-ltz v0, :cond_1
iget-object v1, p0, Lokhttp3/internal/http2/Hpack$Reader;->dynamicTable:[Lokhttp3/internal/http2/Header;
.line 224
array-length v2, v1
if-ge v0, v2, :cond_1
iget-object p1, p0, Lokhttp3/internal/http2/Hpack$Reader;->headerList:Ljava/util/List;
.line 227
aget-object v0, v1, v0
invoke-interface {p1, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z
:goto_0
return-void
.line 225
:cond_1
new-instance v0, Ljava/io/IOException;
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "Header index too large "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
add-int/lit8 p1, p1, 0x1
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {v0, p1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
throw v0
.end method
.method public readInt(II)I
.locals 2
and-int/2addr p1, p2
if-ge p1, p2, :cond_0
return p1
:cond_0
const/4 p1, 0x0
.line 328
:goto_0
invoke-virtual {p0}, Lokhttp3/internal/http2/Hpack$Reader;->readByte()I
move-result v0
and-int/lit16 v1, v0, 0x80
if-eqz v1, :cond_1
and-int/lit8 v0, v0, 0x7f
shl-int/2addr v0, p1
add-int/2addr p2, v0
add-int/lit8 p1, p1, 0x7
goto :goto_0
:cond_1
shl-int p1, v0, p1
add-int/2addr p2, p1
return p2
.end method
.method public final readLiteralHeaderWithIncrementalIndexingIndexedName(I)V
.locals 2
.line 250
invoke-virtual {p0, p1}, Lokhttp3/internal/http2/Hpack$Reader;->getName(I)Lokio/ByteString;
move-result-object p1
.line 251
invoke-virtual {p0}, Lokhttp3/internal/http2/Hpack$Reader;->readByteString()Lokio/ByteString;
move-result-object v0
.line 252
new-instance v1, Lokhttp3/internal/http2/Header;
invoke-direct {v1, p1, v0}, Lokhttp3/internal/http2/Header;-><init>(Lokio/ByteString;Lokio/ByteString;)V
const/4 p1, -0x1
invoke-virtual {p0, p1, v1}, Lokhttp3/internal/http2/Hpack$Reader;->insertIntoDynamicTable(ILokhttp3/internal/http2/Header;)V
return-void
.end method
.method public final readLiteralHeaderWithIncrementalIndexingNewName()V
.locals 3
.line 256
invoke-virtual {p0}, Lokhttp3/internal/http2/Hpack$Reader;->readByteString()Lokio/ByteString;
move-result-object v0
invoke-static {v0}, Lokhttp3/internal/http2/Hpack;->checkLowercase(Lokio/ByteString;)Lokio/ByteString;
move-result-object v0
.line 257
invoke-virtual {p0}, Lokhttp3/internal/http2/Hpack$Reader;->readByteString()Lokio/ByteString;
move-result-object v1
.line 258
new-instance v2, Lokhttp3/internal/http2/Header;
invoke-direct {v2, v0, v1}, Lokhttp3/internal/http2/Header;-><init>(Lokio/ByteString;Lokio/ByteString;)V
const/4 v0, -0x1
invoke-virtual {p0, v0, v2}, Lokhttp3/internal/http2/Hpack$Reader;->insertIntoDynamicTable(ILokhttp3/internal/http2/Header;)V
return-void
.end method
.method public final readLiteralHeaderWithoutIndexingIndexedName(I)V
.locals 3
.line 237
invoke-virtual {p0, p1}, Lokhttp3/internal/http2/Hpack$Reader;->getName(I)Lokio/ByteString;
move-result-object p1
.line 238
invoke-virtual {p0}, Lokhttp3/internal/http2/Hpack$Reader;->readByteString()Lokio/ByteString;
move-result-object v0
iget-object v1, p0, Lokhttp3/internal/http2/Hpack$Reader;->headerList:Ljava/util/List;
.line 239
new-instance v2, Lokhttp3/internal/http2/Header;
invoke-direct {v2, p1, v0}, Lokhttp3/internal/http2/Header;-><init>(Lokio/ByteString;Lokio/ByteString;)V
invoke-interface {v1, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z
return-void
.end method
.method public final readLiteralHeaderWithoutIndexingNewName()V
.locals 4
.line 243
invoke-virtual {p0}, Lokhttp3/internal/http2/Hpack$Reader;->readByteString()Lokio/ByteString;
move-result-object v0
invoke-static {v0}, Lokhttp3/internal/http2/Hpack;->checkLowercase(Lokio/ByteString;)Lokio/ByteString;
move-result-object v0
.line 244
invoke-virtual {p0}, Lokhttp3/internal/http2/Hpack$Reader;->readByteString()Lokio/ByteString;
move-result-object v1
iget-object v2, p0, Lokhttp3/internal/http2/Hpack$Reader;->headerList:Ljava/util/List;
.line 245
new-instance v3, Lokhttp3/internal/http2/Header;
invoke-direct {v3, v0, v1}, Lokhttp3/internal/http2/Header;-><init>(Lokio/ByteString;Lokio/ByteString;)V
invoke-interface {v2, v3}, Ljava/util/List;->add(Ljava/lang/Object;)Z
return-void
.end method

View File

@@ -0,0 +1,791 @@
.class public final Lokhttp3/internal/http2/Hpack$Writer;
.super Ljava/lang/Object;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lokhttp3/internal/http2/Hpack;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "Writer"
.end annotation
# instance fields
.field public dynamicTable:[Lokhttp3/internal/http2/Header;
.field public dynamicTableByteCount:I
.field public emitDynamicTableSizeUpdate:Z
.field public headerCount:I
.field public headerTableSizeSetting:I
.field public maxDynamicTableByteCount:I
.field public nextHeaderIndex:I
.field public final out:Lokio/Buffer;
.field public smallestHeaderTableSizeSetting:I
.field public final useCompression:Z
# direct methods
.method public constructor <init>(IZLokio/Buffer;)V
.locals 1
.line 400
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
const v0, 0x7fffffff
iput v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->smallestHeaderTableSizeSetting:I
const/16 v0, 0x8
new-array v0, v0, [Lokhttp3/internal/http2/Header;
iput-object v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTable:[Lokhttp3/internal/http2/Header;
array-length v0, v0
add-int/lit8 v0, v0, -0x1
iput v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->nextHeaderIndex:I
const/4 v0, 0x0
iput v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->headerCount:I
iput v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTableByteCount:I
iput p1, p0, Lokhttp3/internal/http2/Hpack$Writer;->headerTableSizeSetting:I
iput p1, p0, Lokhttp3/internal/http2/Hpack$Writer;->maxDynamicTableByteCount:I
iput-boolean p2, p0, Lokhttp3/internal/http2/Hpack$Writer;->useCompression:Z
iput-object p3, p0, Lokhttp3/internal/http2/Hpack$Writer;->out:Lokio/Buffer;
return-void
.end method
.method public constructor <init>(Lokio/Buffer;)V
.locals 2
const/16 v0, 0x1000
const/4 v1, 0x1
.line 397
invoke-direct {p0, v0, v1, p1}, Lokhttp3/internal/http2/Hpack$Writer;-><init>(IZLokio/Buffer;)V
return-void
.end method
# virtual methods
.method public final adjustDynamicTableByteCount()V
.locals 2
iget v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->maxDynamicTableByteCount:I
iget v1, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTableByteCount:I
if-ge v0, v1, :cond_1
if-nez v0, :cond_0
.line 583
invoke-virtual {p0}, Lokhttp3/internal/http2/Hpack$Writer;->clearDynamicTable()V
goto :goto_0
:cond_0
sub-int/2addr v1, v0
.line 585
invoke-virtual {p0, v1}, Lokhttp3/internal/http2/Hpack$Writer;->evictToRecoverBytes(I)I
:cond_1
:goto_0
return-void
.end method
.method public final clearDynamicTable()V
.locals 2
iget-object v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTable:[Lokhttp3/internal/http2/Header;
const/4 v1, 0x0
.line 408
invoke-static {v0, v1}, Ljava/util/Arrays;->fill([Ljava/lang/Object;Ljava/lang/Object;)V
iget-object v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTable:[Lokhttp3/internal/http2/Header;
.line 409
array-length v0, v0
add-int/lit8 v0, v0, -0x1
iput v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->nextHeaderIndex:I
const/4 v0, 0x0
iput v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->headerCount:I
iput v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTableByteCount:I
return-void
.end method
.method public final evictToRecoverBytes(I)I
.locals 4
const/4 v0, 0x0
if-lez p1, :cond_1
iget-object v1, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTable:[Lokhttp3/internal/http2/Header;
.line 419
array-length v1, v1
add-int/lit8 v1, v1, -0x1
:goto_0
iget v2, p0, Lokhttp3/internal/http2/Hpack$Writer;->nextHeaderIndex:I
if-lt v1, v2, :cond_0
if-lez p1, :cond_0
iget-object v2, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTable:[Lokhttp3/internal/http2/Header;
.line 420
aget-object v2, v2, v1
iget v2, v2, Lokhttp3/internal/http2/Header;->hpackSize:I
sub-int/2addr p1, v2
iget v3, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTableByteCount:I
sub-int/2addr v3, v2
iput v3, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTableByteCount:I
iget v2, p0, Lokhttp3/internal/http2/Hpack$Writer;->headerCount:I
add-int/lit8 v2, v2, -0x1
iput v2, p0, Lokhttp3/internal/http2/Hpack$Writer;->headerCount:I
add-int/lit8 v0, v0, 0x1
add-int/lit8 v1, v1, -0x1
goto :goto_0
:cond_0
iget-object p1, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTable:[Lokhttp3/internal/http2/Header;
add-int/lit8 v1, v2, 0x1
add-int/lit8 v2, v2, 0x1
add-int/2addr v2, v0
iget v3, p0, Lokhttp3/internal/http2/Hpack$Writer;->headerCount:I
.line 425
invoke-static {p1, v1, p1, v2, v3}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
iget-object p1, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTable:[Lokhttp3/internal/http2/Header;
iget v1, p0, Lokhttp3/internal/http2/Hpack$Writer;->nextHeaderIndex:I
add-int/lit8 v2, v1, 0x1
add-int/lit8 v1, v1, 0x1
add-int/2addr v1, v0
const/4 v3, 0x0
.line 427
invoke-static {p1, v2, v1, v3}, Ljava/util/Arrays;->fill([Ljava/lang/Object;IILjava/lang/Object;)V
iget p1, p0, Lokhttp3/internal/http2/Hpack$Writer;->nextHeaderIndex:I
add-int/2addr p1, v0
iput p1, p0, Lokhttp3/internal/http2/Hpack$Writer;->nextHeaderIndex:I
:cond_1
return v0
.end method
.method public final insertIntoDynamicTable(Lokhttp3/internal/http2/Header;)V
.locals 6
.line 434
iget v0, p1, Lokhttp3/internal/http2/Header;->hpackSize:I
iget v1, p0, Lokhttp3/internal/http2/Hpack$Writer;->maxDynamicTableByteCount:I
if-le v0, v1, :cond_0
.line 438
invoke-virtual {p0}, Lokhttp3/internal/http2/Hpack$Writer;->clearDynamicTable()V
return-void
:cond_0
iget v2, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTableByteCount:I
add-int/2addr v2, v0
sub-int/2addr v2, v1
.line 444
invoke-virtual {p0, v2}, Lokhttp3/internal/http2/Hpack$Writer;->evictToRecoverBytes(I)I
iget v1, p0, Lokhttp3/internal/http2/Hpack$Writer;->headerCount:I
add-int/lit8 v1, v1, 0x1
iget-object v2, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTable:[Lokhttp3/internal/http2/Header;
.line 446
array-length v3, v2
if-le v1, v3, :cond_1
.line 447
array-length v1, v2
mul-int/lit8 v1, v1, 0x2
new-array v1, v1, [Lokhttp3/internal/http2/Header;
.line 448
array-length v3, v2
array-length v4, v2
const/4 v5, 0x0
invoke-static {v2, v5, v1, v3, v4}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
iget-object v2, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTable:[Lokhttp3/internal/http2/Header;
.line 449
array-length v2, v2
add-int/lit8 v2, v2, -0x1
iput v2, p0, Lokhttp3/internal/http2/Hpack$Writer;->nextHeaderIndex:I
iput-object v1, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTable:[Lokhttp3/internal/http2/Header;
:cond_1
iget v1, p0, Lokhttp3/internal/http2/Hpack$Writer;->nextHeaderIndex:I
add-int/lit8 v2, v1, -0x1
iput v2, p0, Lokhttp3/internal/http2/Hpack$Writer;->nextHeaderIndex:I
iget-object v2, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTable:[Lokhttp3/internal/http2/Header;
.line 453
aput-object p1, v2, v1
iget p1, p0, Lokhttp3/internal/http2/Hpack$Writer;->headerCount:I
add-int/lit8 p1, p1, 0x1
iput p1, p0, Lokhttp3/internal/http2/Hpack$Writer;->headerCount:I
iget p1, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTableByteCount:I
add-int/2addr p1, v0
iput p1, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTableByteCount:I
return-void
.end method
.method public setHeaderTableSizeSetting(I)V
.locals 1
iput p1, p0, Lokhttp3/internal/http2/Hpack$Writer;->headerTableSizeSetting:I
const/16 v0, 0x4000
.line 566
invoke-static {p1, v0}, Ljava/lang/Math;->min(II)I
move-result p1
iget v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->maxDynamicTableByteCount:I
if-ne v0, p1, :cond_0
return-void
:cond_0
if-ge p1, v0, :cond_1
iget v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->smallestHeaderTableSizeSetting:I
.line 572
invoke-static {v0, p1}, Ljava/lang/Math;->min(II)I
move-result v0
iput v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->smallestHeaderTableSizeSetting:I
:cond_1
const/4 v0, 0x1
iput-boolean v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->emitDynamicTableSizeUpdate:Z
iput p1, p0, Lokhttp3/internal/http2/Hpack$Writer;->maxDynamicTableByteCount:I
.line 577
invoke-virtual {p0}, Lokhttp3/internal/http2/Hpack$Writer;->adjustDynamicTableByteCount()V
return-void
.end method
.method public writeByteString(Lokio/ByteString;)V
.locals 3
iget-boolean v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->useCompression:Z
const/16 v1, 0x7f
if-eqz v0, :cond_0
.line 552
invoke-static {}, Lokhttp3/internal/http2/Huffman;->get()Lokhttp3/internal/http2/Huffman;
move-result-object v0
invoke-virtual {v0, p1}, Lokhttp3/internal/http2/Huffman;->encodedLength(Lokio/ByteString;)I
move-result v0
invoke-virtual {p1}, Lokio/ByteString;->size()I
move-result v2
if-ge v0, v2, :cond_0
.line 553
new-instance v0, Lokio/Buffer;
invoke-direct {v0}, Lokio/Buffer;-><init>()V
.line 554
invoke-static {}, Lokhttp3/internal/http2/Huffman;->get()Lokhttp3/internal/http2/Huffman;
move-result-object v2
invoke-virtual {v2, p1, v0}, Lokhttp3/internal/http2/Huffman;->encode(Lokio/ByteString;Lokio/BufferedSink;)V
.line 555
invoke-virtual {v0}, Lokio/Buffer;->readByteString()Lokio/ByteString;
move-result-object p1
.line 556
invoke-virtual {p1}, Lokio/ByteString;->size()I
move-result v0
const/16 v2, 0x80
invoke-virtual {p0, v0, v1, v2}, Lokhttp3/internal/http2/Hpack$Writer;->writeInt(III)V
iget-object v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->out:Lokio/Buffer;
.line 557
invoke-virtual {v0, p1}, Lokio/Buffer;->write(Lokio/ByteString;)Lokio/Buffer;
goto :goto_0
.line 559
:cond_0
invoke-virtual {p1}, Lokio/ByteString;->size()I
move-result v0
const/4 v2, 0x0
invoke-virtual {p0, v0, v1, v2}, Lokhttp3/internal/http2/Hpack$Writer;->writeInt(III)V
iget-object v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->out:Lokio/Buffer;
.line 560
invoke-virtual {v0, p1}, Lokio/Buffer;->write(Lokio/ByteString;)Lokio/Buffer;
:goto_0
return-void
.end method
.method public writeHeaders(Ljava/util/List;)V
.locals 13
iget-boolean v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->emitDynamicTableSizeUpdate:Z
const/4 v1, 0x0
if-eqz v0, :cond_1
iget v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->smallestHeaderTableSizeSetting:I
iget v2, p0, Lokhttp3/internal/http2/Hpack$Writer;->maxDynamicTableByteCount:I
const/16 v3, 0x20
const/16 v4, 0x1f
if-ge v0, v2, :cond_0
.line 464
invoke-virtual {p0, v0, v4, v3}, Lokhttp3/internal/http2/Hpack$Writer;->writeInt(III)V
:cond_0
iput-boolean v1, p0, Lokhttp3/internal/http2/Hpack$Writer;->emitDynamicTableSizeUpdate:Z
const v0, 0x7fffffff
iput v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->smallestHeaderTableSizeSetting:I
iget v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->maxDynamicTableByteCount:I
.line 468
invoke-virtual {p0, v0, v4, v3}, Lokhttp3/internal/http2/Hpack$Writer;->writeInt(III)V
.line 471
:cond_1
invoke-interface {p1}, Ljava/util/List;->size()I
move-result v0
move v2, v1
:goto_0
if-ge v2, v0, :cond_b
.line 472
invoke-interface {p1, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v3
check-cast v3, Lokhttp3/internal/http2/Header;
.line 473
iget-object v4, v3, Lokhttp3/internal/http2/Header;->name:Lokio/ByteString;
invoke-virtual {v4}, Lokio/ByteString;->toAsciiLowercase()Lokio/ByteString;
move-result-object v4
.line 474
iget-object v5, v3, Lokhttp3/internal/http2/Header;->value:Lokio/ByteString;
.line 478
sget-object v6, Lokhttp3/internal/http2/Hpack;->NAME_TO_FIRST_INDEX:Ljava/util/Map;
invoke-interface {v6, v4}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v6
check-cast v6, Ljava/lang/Integer;
const/4 v7, 0x1
const/4 v8, -0x1
if-eqz v6, :cond_4
.line 480
invoke-virtual {v6}, Ljava/lang/Integer;->intValue()I
move-result v6
add-int/lit8 v9, v6, 0x1
if-le v9, v7, :cond_3
const/16 v10, 0x8
if-ge v9, v10, :cond_3
.line 486
sget-object v10, Lokhttp3/internal/http2/Hpack;->STATIC_HEADER_TABLE:[Lokhttp3/internal/http2/Header;
aget-object v11, v10, v6
iget-object v11, v11, Lokhttp3/internal/http2/Header;->value:Lokio/ByteString;
invoke-static {v11, v5}, Ljava/util/Objects;->equals(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v11
if-eqz v11, :cond_2
move v6, v9
goto :goto_1
.line 488
:cond_2
aget-object v10, v10, v9
iget-object v10, v10, Lokhttp3/internal/http2/Header;->value:Lokio/ByteString;
invoke-static {v10, v5}, Ljava/util/Objects;->equals(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v10
if-eqz v10, :cond_3
add-int/lit8 v6, v6, 0x2
move v12, v9
move v9, v6
move v6, v12
goto :goto_1
:cond_3
move v6, v9
move v9, v8
goto :goto_1
:cond_4
move v6, v8
move v9, v6
:goto_1
if-ne v9, v8, :cond_7
iget v10, p0, Lokhttp3/internal/http2/Hpack$Writer;->nextHeaderIndex:I
add-int/2addr v10, v7
iget-object v7, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTable:[Lokhttp3/internal/http2/Header;
.line 495
array-length v7, v7
:goto_2
if-ge v10, v7, :cond_7
iget-object v11, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTable:[Lokhttp3/internal/http2/Header;
.line 496
aget-object v11, v11, v10
iget-object v11, v11, Lokhttp3/internal/http2/Header;->name:Lokio/ByteString;
invoke-static {v11, v4}, Ljava/util/Objects;->equals(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v11
if-eqz v11, :cond_6
iget-object v11, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTable:[Lokhttp3/internal/http2/Header;
.line 497
aget-object v11, v11, v10
iget-object v11, v11, Lokhttp3/internal/http2/Header;->value:Lokio/ByteString;
invoke-static {v11, v5}, Ljava/util/Objects;->equals(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v11
if-eqz v11, :cond_5
iget v7, p0, Lokhttp3/internal/http2/Hpack$Writer;->nextHeaderIndex:I
sub-int/2addr v10, v7
.line 498
sget-object v7, Lokhttp3/internal/http2/Hpack;->STATIC_HEADER_TABLE:[Lokhttp3/internal/http2/Header;
array-length v7, v7
add-int v9, v10, v7
goto :goto_3
:cond_5
if-ne v6, v8, :cond_6
iget v6, p0, Lokhttp3/internal/http2/Hpack$Writer;->nextHeaderIndex:I
sub-int v6, v10, v6
.line 501
sget-object v11, Lokhttp3/internal/http2/Hpack;->STATIC_HEADER_TABLE:[Lokhttp3/internal/http2/Header;
array-length v11, v11
add-int/2addr v6, v11
:cond_6
add-int/lit8 v10, v10, 0x1
goto :goto_2
:cond_7
:goto_3
if-eq v9, v8, :cond_8
const/16 v3, 0x7f
const/16 v4, 0x80
.line 509
invoke-virtual {p0, v9, v3, v4}, Lokhttp3/internal/http2/Hpack$Writer;->writeInt(III)V
goto :goto_4
:cond_8
const/16 v7, 0x40
if-ne v6, v8, :cond_9
iget-object v6, p0, Lokhttp3/internal/http2/Hpack$Writer;->out:Lokio/Buffer;
.line 512
invoke-virtual {v6, v7}, Lokio/Buffer;->writeByte(I)Lokio/Buffer;
.line 513
invoke-virtual {p0, v4}, Lokhttp3/internal/http2/Hpack$Writer;->writeByteString(Lokio/ByteString;)V
.line 514
invoke-virtual {p0, v5}, Lokhttp3/internal/http2/Hpack$Writer;->writeByteString(Lokio/ByteString;)V
.line 515
invoke-virtual {p0, v3}, Lokhttp3/internal/http2/Hpack$Writer;->insertIntoDynamicTable(Lokhttp3/internal/http2/Header;)V
goto :goto_4
.line 516
:cond_9
sget-object v8, Lokhttp3/internal/http2/Header;->PSEUDO_PREFIX:Lokio/ByteString;
invoke-virtual {v4, v8}, Lokio/ByteString;->startsWith(Lokio/ByteString;)Z
move-result v8
if-eqz v8, :cond_a
sget-object v8, Lokhttp3/internal/http2/Header;->TARGET_AUTHORITY:Lokio/ByteString;
invoke-virtual {v8, v4}, Lokio/ByteString;->equals(Ljava/lang/Object;)Z
move-result v4
if-nez v4, :cond_a
const/16 v3, 0xf
.line 519
invoke-virtual {p0, v6, v3, v1}, Lokhttp3/internal/http2/Hpack$Writer;->writeInt(III)V
.line 520
invoke-virtual {p0, v5}, Lokhttp3/internal/http2/Hpack$Writer;->writeByteString(Lokio/ByteString;)V
goto :goto_4
:cond_a
const/16 v4, 0x3f
.line 523
invoke-virtual {p0, v6, v4, v7}, Lokhttp3/internal/http2/Hpack$Writer;->writeInt(III)V
.line 524
invoke-virtual {p0, v5}, Lokhttp3/internal/http2/Hpack$Writer;->writeByteString(Lokio/ByteString;)V
.line 525
invoke-virtual {p0, v3}, Lokhttp3/internal/http2/Hpack$Writer;->insertIntoDynamicTable(Lokhttp3/internal/http2/Header;)V
:goto_4
add-int/lit8 v2, v2, 0x1
goto/16 :goto_0
:cond_b
return-void
.end method
.method public writeInt(III)V
.locals 1
if-ge p1, p2, :cond_0
iget-object p2, p0, Lokhttp3/internal/http2/Hpack$Writer;->out:Lokio/Buffer;
or-int/2addr p1, p3
.line 534
invoke-virtual {p2, p1}, Lokio/Buffer;->writeByte(I)Lokio/Buffer;
return-void
:cond_0
iget-object v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->out:Lokio/Buffer;
or-int/2addr p3, p2
.line 539
invoke-virtual {v0, p3}, Lokio/Buffer;->writeByte(I)Lokio/Buffer;
sub-int/2addr p1, p2
:goto_0
const/16 p2, 0x80
if-lt p1, p2, :cond_1
and-int/lit8 p3, p1, 0x7f
iget-object v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->out:Lokio/Buffer;
or-int/2addr p2, p3
.line 545
invoke-virtual {v0, p2}, Lokio/Buffer;->writeByte(I)Lokio/Buffer;
ushr-int/lit8 p1, p1, 0x7
goto :goto_0
:cond_1
iget-object p2, p0, Lokhttp3/internal/http2/Hpack$Writer;->out:Lokio/Buffer;
.line 548
invoke-virtual {p2, p1}, Lokio/Buffer;->writeByte(I)Lokio/Buffer;
return-void
.end method

View File

@@ -0,0 +1,680 @@
.class public abstract Lokhttp3/internal/http2/Hpack;
.super Ljava/lang/Object;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lokhttp3/internal/http2/Hpack$Writer;,
Lokhttp3/internal/http2/Hpack$Reader;
}
.end annotation
# static fields
.field public static final NAME_TO_FIRST_INDEX:Ljava/util/Map;
.field public static final STATIC_HEADER_TABLE:[Lokhttp3/internal/http2/Header;
# direct methods
.method static constructor <clinit>()V
.locals 65
.line 47
new-instance v1, Lokhttp3/internal/http2/Header;
move-object v0, v1
sget-object v2, Lokhttp3/internal/http2/Header;->TARGET_AUTHORITY:Lokio/ByteString;
const-string v15, ""
invoke-direct {v1, v2, v15}, Lokhttp3/internal/http2/Header;-><init>(Lokio/ByteString;Ljava/lang/String;)V
new-instance v2, Lokhttp3/internal/http2/Header;
move-object v1, v2
sget-object v3, Lokhttp3/internal/http2/Header;->TARGET_METHOD:Lokio/ByteString;
const-string v4, "GET"
invoke-direct {v2, v3, v4}, Lokhttp3/internal/http2/Header;-><init>(Lokio/ByteString;Ljava/lang/String;)V
new-instance v4, Lokhttp3/internal/http2/Header;
move-object v2, v4
const-string v5, "POST"
invoke-direct {v4, v3, v5}, Lokhttp3/internal/http2/Header;-><init>(Lokio/ByteString;Ljava/lang/String;)V
new-instance v4, Lokhttp3/internal/http2/Header;
move-object v3, v4
sget-object v5, Lokhttp3/internal/http2/Header;->TARGET_PATH:Lokio/ByteString;
const-string v6, "/"
invoke-direct {v4, v5, v6}, Lokhttp3/internal/http2/Header;-><init>(Lokio/ByteString;Ljava/lang/String;)V
new-instance v6, Lokhttp3/internal/http2/Header;
move-object v4, v6
const-string v7, "/index.html"
invoke-direct {v6, v5, v7}, Lokhttp3/internal/http2/Header;-><init>(Lokio/ByteString;Ljava/lang/String;)V
new-instance v6, Lokhttp3/internal/http2/Header;
move-object v5, v6
sget-object v7, Lokhttp3/internal/http2/Header;->TARGET_SCHEME:Lokio/ByteString;
const-string v8, "http"
invoke-direct {v6, v7, v8}, Lokhttp3/internal/http2/Header;-><init>(Lokio/ByteString;Ljava/lang/String;)V
new-instance v8, Lokhttp3/internal/http2/Header;
move-object v6, v8
const-string v9, "https"
invoke-direct {v8, v7, v9}, Lokhttp3/internal/http2/Header;-><init>(Lokio/ByteString;Ljava/lang/String;)V
new-instance v8, Lokhttp3/internal/http2/Header;
move-object v7, v8
sget-object v14, Lokhttp3/internal/http2/Header;->RESPONSE_STATUS:Lokio/ByteString;
const-string v9, "200"
invoke-direct {v8, v14, v9}, Lokhttp3/internal/http2/Header;-><init>(Lokio/ByteString;Ljava/lang/String;)V
new-instance v9, Lokhttp3/internal/http2/Header;
move-object v8, v9
const-string v10, "204"
invoke-direct {v9, v14, v10}, Lokhttp3/internal/http2/Header;-><init>(Lokio/ByteString;Ljava/lang/String;)V
new-instance v10, Lokhttp3/internal/http2/Header;
move-object v9, v10
const-string v11, "206"
invoke-direct {v10, v14, v11}, Lokhttp3/internal/http2/Header;-><init>(Lokio/ByteString;Ljava/lang/String;)V
new-instance v11, Lokhttp3/internal/http2/Header;
move-object v10, v11
const-string v12, "304"
invoke-direct {v11, v14, v12}, Lokhttp3/internal/http2/Header;-><init>(Lokio/ByteString;Ljava/lang/String;)V
new-instance v12, Lokhttp3/internal/http2/Header;
move-object v11, v12
const-string v13, "400"
invoke-direct {v12, v14, v13}, Lokhttp3/internal/http2/Header;-><init>(Lokio/ByteString;Ljava/lang/String;)V
new-instance v13, Lokhttp3/internal/http2/Header;
move-object v12, v13
move-object/from16 v61, v0
const-string v0, "404"
invoke-direct {v13, v14, v0}, Lokhttp3/internal/http2/Header;-><init>(Lokio/ByteString;Ljava/lang/String;)V
new-instance v0, Lokhttp3/internal/http2/Header;
move-object v13, v0
move-object/from16 v62, v1
const-string v1, "500"
invoke-direct {v0, v14, v1}, Lokhttp3/internal/http2/Header;-><init>(Lokio/ByteString;Ljava/lang/String;)V
new-instance v0, Lokhttp3/internal/http2/Header;
move-object v14, v0
const-string v1, "accept-charset"
invoke-direct {v0, v1, v15}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
new-instance v0, Lokhttp3/internal/http2/Header;
move-object v1, v15
move-object v15, v0
move-object/from16 v63, v2
const-string v2, "accept-encoding"
move-object/from16 v64, v3
const-string v3, "gzip, deflate"
invoke-direct {v0, v2, v3}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
new-instance v0, Lokhttp3/internal/http2/Header;
move-object/from16 v16, v0
const-string v2, "accept-language"
invoke-direct {v0, v2, v1}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
new-instance v0, Lokhttp3/internal/http2/Header;
move-object/from16 v17, v0
const-string v2, "accept-ranges"
invoke-direct {v0, v2, v1}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
new-instance v0, Lokhttp3/internal/http2/Header;
move-object/from16 v18, v0
const-string v2, "accept"
invoke-direct {v0, v2, v1}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
new-instance v0, Lokhttp3/internal/http2/Header;
move-object/from16 v19, v0
const-string v2, "access-control-allow-origin"
invoke-direct {v0, v2, v1}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
new-instance v0, Lokhttp3/internal/http2/Header;
move-object/from16 v20, v0
const-string v2, "age"
invoke-direct {v0, v2, v1}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
new-instance v0, Lokhttp3/internal/http2/Header;
move-object/from16 v21, v0
const-string v2, "allow"
invoke-direct {v0, v2, v1}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
new-instance v0, Lokhttp3/internal/http2/Header;
move-object/from16 v22, v0
const-string v2, "authorization"
invoke-direct {v0, v2, v1}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
new-instance v0, Lokhttp3/internal/http2/Header;
move-object/from16 v23, v0
const-string v2, "cache-control"
invoke-direct {v0, v2, v1}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
new-instance v0, Lokhttp3/internal/http2/Header;
move-object/from16 v24, v0
const-string v2, "content-disposition"
invoke-direct {v0, v2, v1}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
new-instance v0, Lokhttp3/internal/http2/Header;
move-object/from16 v25, v0
const-string v2, "content-encoding"
invoke-direct {v0, v2, v1}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
new-instance v0, Lokhttp3/internal/http2/Header;
move-object/from16 v26, v0
const-string v2, "content-language"
invoke-direct {v0, v2, v1}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
new-instance v0, Lokhttp3/internal/http2/Header;
move-object/from16 v27, v0
const-string v2, "content-length"
invoke-direct {v0, v2, v1}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
new-instance v0, Lokhttp3/internal/http2/Header;
move-object/from16 v28, v0
const-string v2, "content-location"
invoke-direct {v0, v2, v1}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
new-instance v0, Lokhttp3/internal/http2/Header;
move-object/from16 v29, v0
const-string v2, "content-range"
invoke-direct {v0, v2, v1}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
new-instance v0, Lokhttp3/internal/http2/Header;
move-object/from16 v30, v0
const-string v2, "content-type"
invoke-direct {v0, v2, v1}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
new-instance v0, Lokhttp3/internal/http2/Header;
move-object/from16 v31, v0
const-string v2, "cookie"
invoke-direct {v0, v2, v1}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
new-instance v0, Lokhttp3/internal/http2/Header;
move-object/from16 v32, v0
const-string v2, "date"
invoke-direct {v0, v2, v1}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
new-instance v0, Lokhttp3/internal/http2/Header;
move-object/from16 v33, v0
const-string v2, "etag"
invoke-direct {v0, v2, v1}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
new-instance v0, Lokhttp3/internal/http2/Header;
move-object/from16 v34, v0
const-string v2, "expect"
invoke-direct {v0, v2, v1}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
new-instance v0, Lokhttp3/internal/http2/Header;
move-object/from16 v35, v0
const-string v2, "expires"
invoke-direct {v0, v2, v1}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
new-instance v0, Lokhttp3/internal/http2/Header;
move-object/from16 v36, v0
const-string v2, "from"
invoke-direct {v0, v2, v1}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
new-instance v0, Lokhttp3/internal/http2/Header;
move-object/from16 v37, v0
const-string v2, "host"
invoke-direct {v0, v2, v1}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
new-instance v0, Lokhttp3/internal/http2/Header;
move-object/from16 v38, v0
const-string v2, "if-match"
invoke-direct {v0, v2, v1}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
new-instance v0, Lokhttp3/internal/http2/Header;
move-object/from16 v39, v0
const-string v2, "if-modified-since"
invoke-direct {v0, v2, v1}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
new-instance v0, Lokhttp3/internal/http2/Header;
move-object/from16 v40, v0
const-string v2, "if-none-match"
invoke-direct {v0, v2, v1}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
new-instance v0, Lokhttp3/internal/http2/Header;
move-object/from16 v41, v0
const-string v2, "if-range"
invoke-direct {v0, v2, v1}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
new-instance v0, Lokhttp3/internal/http2/Header;
move-object/from16 v42, v0
const-string v2, "if-unmodified-since"
invoke-direct {v0, v2, v1}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
new-instance v0, Lokhttp3/internal/http2/Header;
move-object/from16 v43, v0
const-string v2, "last-modified"
invoke-direct {v0, v2, v1}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
new-instance v0, Lokhttp3/internal/http2/Header;
move-object/from16 v44, v0
const-string v2, "link"
invoke-direct {v0, v2, v1}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
new-instance v0, Lokhttp3/internal/http2/Header;
move-object/from16 v45, v0
const-string v2, "location"
invoke-direct {v0, v2, v1}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
new-instance v0, Lokhttp3/internal/http2/Header;
move-object/from16 v46, v0
const-string v2, "max-forwards"
invoke-direct {v0, v2, v1}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
new-instance v0, Lokhttp3/internal/http2/Header;
move-object/from16 v47, v0
const-string v2, "proxy-authenticate"
invoke-direct {v0, v2, v1}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
new-instance v0, Lokhttp3/internal/http2/Header;
move-object/from16 v48, v0
const-string v2, "proxy-authorization"
invoke-direct {v0, v2, v1}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
new-instance v0, Lokhttp3/internal/http2/Header;
move-object/from16 v49, v0
const-string v2, "range"
invoke-direct {v0, v2, v1}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
new-instance v0, Lokhttp3/internal/http2/Header;
move-object/from16 v50, v0
const-string v2, "referer"
invoke-direct {v0, v2, v1}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
new-instance v0, Lokhttp3/internal/http2/Header;
move-object/from16 v51, v0
const-string v2, "refresh"
invoke-direct {v0, v2, v1}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
new-instance v0, Lokhttp3/internal/http2/Header;
move-object/from16 v52, v0
const-string v2, "retry-after"
invoke-direct {v0, v2, v1}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
new-instance v0, Lokhttp3/internal/http2/Header;
move-object/from16 v53, v0
const-string v2, "server"
invoke-direct {v0, v2, v1}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
new-instance v0, Lokhttp3/internal/http2/Header;
move-object/from16 v54, v0
const-string v2, "set-cookie"
invoke-direct {v0, v2, v1}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
new-instance v0, Lokhttp3/internal/http2/Header;
move-object/from16 v55, v0
const-string v2, "strict-transport-security"
invoke-direct {v0, v2, v1}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
new-instance v0, Lokhttp3/internal/http2/Header;
move-object/from16 v56, v0
const-string v2, "transfer-encoding"
invoke-direct {v0, v2, v1}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
new-instance v0, Lokhttp3/internal/http2/Header;
move-object/from16 v57, v0
const-string v2, "user-agent"
invoke-direct {v0, v2, v1}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
new-instance v0, Lokhttp3/internal/http2/Header;
move-object/from16 v58, v0
const-string v2, "vary"
invoke-direct {v0, v2, v1}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
new-instance v0, Lokhttp3/internal/http2/Header;
move-object/from16 v59, v0
const-string v2, "via"
invoke-direct {v0, v2, v1}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
new-instance v0, Lokhttp3/internal/http2/Header;
move-object/from16 v60, v0
const-string v2, "www-authenticate"
invoke-direct {v0, v2, v1}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
move-object/from16 v0, v61
move-object/from16 v1, v62
move-object/from16 v2, v63
move-object/from16 v3, v64
filled-new-array/range {v0 .. v60}, [Lokhttp3/internal/http2/Header;
move-result-object v0
sput-object v0, Lokhttp3/internal/http2/Hpack;->STATIC_HEADER_TABLE:[Lokhttp3/internal/http2/Header;
.line 354
invoke-static {}, Lokhttp3/internal/http2/Hpack;->nameToFirstIndex()Ljava/util/Map;
move-result-object v0
sput-object v0, Lokhttp3/internal/http2/Hpack;->NAME_TO_FIRST_INDEX:Ljava/util/Map;
return-void
.end method
.method public static checkLowercase(Lokio/ByteString;)Lokio/ByteString;
.locals 4
.line 596
invoke-virtual {p0}, Lokio/ByteString;->size()I
move-result v0
const/4 v1, 0x0
:goto_0
if-ge v1, v0, :cond_2
.line 597
invoke-virtual {p0, v1}, Lokio/ByteString;->getByte(I)B
move-result v2
const/16 v3, 0x41
if-lt v2, v3, :cond_1
const/16 v3, 0x5a
if-le v2, v3, :cond_0
goto :goto_1
.line 599
:cond_0
new-instance v0, Ljava/io/IOException;
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "PROTOCOL_ERROR response malformed: mixed case name: "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p0}, Lokio/ByteString;->utf8()Ljava/lang/String;
move-result-object p0
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
invoke-direct {v0, p0}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
throw v0
:cond_1
:goto_1
add-int/lit8 v1, v1, 0x1
goto :goto_0
:cond_2
return-object p0
.end method
.method public static nameToFirstIndex()Ljava/util/Map;
.locals 4
.line 357
new-instance v0, Ljava/util/LinkedHashMap;
sget-object v1, Lokhttp3/internal/http2/Hpack;->STATIC_HEADER_TABLE:[Lokhttp3/internal/http2/Header;
array-length v1, v1
invoke-direct {v0, v1}, Ljava/util/LinkedHashMap;-><init>(I)V
const/4 v1, 0x0
:goto_0
sget-object v2, Lokhttp3/internal/http2/Hpack;->STATIC_HEADER_TABLE:[Lokhttp3/internal/http2/Header;
.line 358
array-length v3, v2
if-ge v1, v3, :cond_1
.line 359
aget-object v3, v2, v1
iget-object v3, v3, Lokhttp3/internal/http2/Header;->name:Lokio/ByteString;
invoke-interface {v0, v3}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z
move-result v3
if-nez v3, :cond_0
.line 360
aget-object v2, v2, v1
iget-object v2, v2, Lokhttp3/internal/http2/Header;->name:Lokio/ByteString;
invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v3
invoke-interface {v0, v2, v3}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
:cond_0
add-int/lit8 v1, v1, 0x1
goto :goto_0
.line 363
:cond_1
invoke-static {v0}, Ljava/util/Collections;->unmodifiableMap(Ljava/util/Map;)Ljava/util/Map;
move-result-object v0
return-object v0
.end method

View File

@@ -0,0 +1,512 @@
.class public abstract Lokhttp3/internal/http2/Http2;
.super Ljava/lang/Object;
.source "SourceFile"
# static fields
.field public static final BINARY:[Ljava/lang/String;
.field public static final CONNECTION_PREFACE:Lokio/ByteString;
.field public static final FLAGS:[Ljava/lang/String;
.field public static final FRAME_NAMES:[Ljava/lang/String;
# direct methods
.method static constructor <clinit>()V
.locals 13
const-string v0, "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n"
.line 25
invoke-static {v0}, Lokio/ByteString;->encodeUtf8(Ljava/lang/String;)Lokio/ByteString;
move-result-object v0
sput-object v0, Lokhttp3/internal/http2/Http2;->CONNECTION_PREFACE:Lokio/ByteString;
const-string v1, "DATA"
const-string v2, "HEADERS"
const-string v3, "PRIORITY"
const-string v4, "RST_STREAM"
const-string v5, "SETTINGS"
const-string v6, "PUSH_PROMISE"
const-string v7, "PING"
const-string v8, "GOAWAY"
const-string v9, "WINDOW_UPDATE"
const-string v10, "CONTINUATION"
filled-new-array/range {v1 .. v10}, [Ljava/lang/String;
move-result-object v0
sput-object v0, Lokhttp3/internal/http2/Http2;->FRAME_NAMES:[Ljava/lang/String;
const/16 v0, 0x40
new-array v0, v0, [Ljava/lang/String;
sput-object v0, Lokhttp3/internal/http2/Http2;->FLAGS:[Ljava/lang/String;
const/16 v0, 0x100
new-array v0, v0, [Ljava/lang/String;
sput-object v0, Lokhttp3/internal/http2/Http2;->BINARY:[Ljava/lang/String;
const/4 v0, 0x0
move v1, v0
:goto_0
sget-object v2, Lokhttp3/internal/http2/Http2;->BINARY:[Ljava/lang/String;
.line 71
array-length v3, v2
const/16 v4, 0x20
if-ge v1, v3, :cond_0
.line 72
invoke-static {v1}, Ljava/lang/Integer;->toBinaryString(I)Ljava/lang/String;
move-result-object v3
filled-new-array {v3}, [Ljava/lang/Object;
move-result-object v3
const-string v5, "%8s"
invoke-static {v5, v3}, Lokhttp3/internal/Util;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object v3
const/16 v5, 0x30
invoke-virtual {v3, v4, v5}, Ljava/lang/String;->replace(CC)Ljava/lang/String;
move-result-object v3
aput-object v3, v2, v1
add-int/lit8 v1, v1, 0x1
goto :goto_0
:cond_0
sget-object v1, Lokhttp3/internal/http2/Http2;->FLAGS:[Ljava/lang/String;
const-string v2, ""
.line 75
aput-object v2, v1, v0
const-string v2, "END_STREAM"
const/4 v3, 0x1
.line 76
aput-object v2, v1, v3
filled-new-array {v3}, [I
move-result-object v2
const-string v3, "PADDED"
const/16 v5, 0x8
.line 80
aput-object v3, v1, v5
.line 81
aget v3, v2, v0
or-int/lit8 v6, v3, 0x8
.line 82
new-instance v7, Ljava/lang/StringBuilder;
invoke-direct {v7}, Ljava/lang/StringBuilder;-><init>()V
aget-object v3, v1, v3
invoke-virtual {v7, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string v3, "|PADDED"
invoke-virtual {v7, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v7
aput-object v7, v1, v6
const-string v6, "END_HEADERS"
const/4 v7, 0x4
.line 85
aput-object v6, v1, v7
const-string v6, "PRIORITY"
.line 86
aput-object v6, v1, v4
const-string v6, "END_HEADERS|PRIORITY"
const/16 v8, 0x24
.line 87
aput-object v6, v1, v8
filled-new-array {v7, v4, v8}, [I
move-result-object v1
move v4, v0
:goto_1
const/4 v6, 0x3
if-ge v4, v6, :cond_1
.line 92
aget v6, v1, v4
.line 93
aget v7, v2, v0
sget-object v8, Lokhttp3/internal/http2/Http2;->FLAGS:[Ljava/lang/String;
or-int v9, v7, v6
.line 94
new-instance v10, Ljava/lang/StringBuilder;
invoke-direct {v10}, Ljava/lang/StringBuilder;-><init>()V
aget-object v11, v8, v7
invoke-virtual {v10, v11}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const/16 v11, 0x7c
invoke-virtual {v10, v11}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
aget-object v12, v8, v6
invoke-virtual {v10, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v10}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v10
aput-object v10, v8, v9
or-int/2addr v9, v5
.line 95
new-instance v10, Ljava/lang/StringBuilder;
invoke-direct {v10}, Ljava/lang/StringBuilder;-><init>()V
aget-object v7, v8, v7
invoke-virtual {v10, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v10, v11}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
aget-object v6, v8, v6
invoke-virtual {v10, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v10, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v10}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v6
aput-object v6, v8, v9
add-int/lit8 v4, v4, 0x1
goto :goto_1
:cond_1
:goto_2
sget-object v1, Lokhttp3/internal/http2/Http2;->FLAGS:[Ljava/lang/String;
.line 100
array-length v2, v1
if-ge v0, v2, :cond_3
.line 101
aget-object v2, v1, v0
if-nez v2, :cond_2
sget-object v2, Lokhttp3/internal/http2/Http2;->BINARY:[Ljava/lang/String;
aget-object v2, v2, v0
aput-object v2, v1, v0
:cond_2
add-int/lit8 v0, v0, 0x1
goto :goto_2
:cond_3
return-void
.end method
.method public static formatFlags(BB)Ljava/lang/String;
.locals 2
if-nez p1, :cond_0
const-string p0, ""
return-object p0
:cond_0
const/4 v0, 0x2
if-eq p0, v0, :cond_6
const/4 v0, 0x3
if-eq p0, v0, :cond_6
const/4 v0, 0x4
if-eq p0, v0, :cond_4
const/4 v0, 0x6
if-eq p0, v0, :cond_4
const/4 v0, 0x7
if-eq p0, v0, :cond_6
const/16 v0, 0x8
if-eq p0, v0, :cond_6
sget-object v0, Lokhttp3/internal/http2/Http2;->FLAGS:[Ljava/lang/String;
.line 158
array-length v1, v0
if-ge p1, v1, :cond_1
aget-object v0, v0, p1
goto :goto_0
:cond_1
sget-object v0, Lokhttp3/internal/http2/Http2;->BINARY:[Ljava/lang/String;
aget-object v0, v0, p1
:goto_0
const/4 v1, 0x5
if-ne p0, v1, :cond_2
and-int/lit8 v1, p1, 0x4
if-eqz v1, :cond_2
const-string p0, "HEADERS"
const-string p1, "PUSH_PROMISE"
.line 161
invoke-virtual {v0, p0, p1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
move-result-object p0
return-object p0
:cond_2
if-nez p0, :cond_3
and-int/lit8 p0, p1, 0x20
if-eqz p0, :cond_3
const-string p0, "PRIORITY"
const-string p1, "COMPRESSED"
.line 163
invoke-virtual {v0, p0, p1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
move-result-object p0
return-object p0
:cond_3
return-object v0
:cond_4
const/4 p0, 0x1
if-ne p1, p0, :cond_5
const-string p0, "ACK"
goto :goto_1
:cond_5
sget-object p0, Lokhttp3/internal/http2/Http2;->BINARY:[Ljava/lang/String;
.line 151
aget-object p0, p0, p1
:goto_1
return-object p0
:cond_6
sget-object p0, Lokhttp3/internal/http2/Http2;->BINARY:[Ljava/lang/String;
.line 156
aget-object p0, p0, p1
return-object p0
.end method
.method public static frameLog(ZIIBB)Ljava/lang/String;
.locals 2
sget-object v0, Lokhttp3/internal/http2/Http2;->FRAME_NAMES:[Ljava/lang/String;
.line 135
array-length v1, v0
if-ge p3, v1, :cond_0
aget-object v0, v0, p3
goto :goto_0
:cond_0
invoke-static {p3}, Ljava/lang/Byte;->valueOf(B)Ljava/lang/Byte;
move-result-object v0
filled-new-array {v0}, [Ljava/lang/Object;
move-result-object v0
const-string v1, "0x%02x"
invoke-static {v1, v0}, Lokhttp3/internal/Util;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object v0
.line 136
:goto_0
invoke-static {p3, p4}, Lokhttp3/internal/http2/Http2;->formatFlags(BB)Ljava/lang/String;
move-result-object p3
const/4 p4, 0x5
new-array p4, p4, [Ljava/lang/Object;
if-eqz p0, :cond_1
const-string p0, "<<"
goto :goto_1
:cond_1
const-string p0, ">>"
:goto_1
const/4 v1, 0x0
aput-object p0, p4, v1
const/4 p0, 0x1
.line 137
invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object p1
aput-object p1, p4, p0
const/4 p0, 0x2
invoke-static {p2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object p1
aput-object p1, p4, p0
const/4 p0, 0x3
aput-object v0, p4, p0
const/4 p0, 0x4
aput-object p3, p4, p0
const-string p0, "%s 0x%08x %5d %-13s %s"
invoke-static {p0, p4}, Lokhttp3/internal/Util;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object p0
return-object p0
.end method
.method public static varargs illegalArgument(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/IllegalArgumentException;
.locals 1
.line 109
new-instance v0, Ljava/lang/IllegalArgumentException;
invoke-static {p0, p1}, Lokhttp3/internal/Util;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object p0
invoke-direct {v0, p0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw v0
.end method
.method public static varargs ioException(Ljava/lang/String;[Ljava/lang/Object;)Ljava/io/IOException;
.locals 1
.line 113
new-instance v0, Ljava/io/IOException;
invoke-static {p0, p1}, Lokhttp3/internal/Util;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object p0
invoke-direct {v0, p0}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
throw v0
.end method

View File

@@ -0,0 +1,70 @@
.class public Lokhttp3/internal/http2/Http2Connection$1;
.super Lokhttp3/internal/NamedRunnable;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lokhttp3/internal/http2/Http2Connection;->writeSynResetLater(ILokhttp3/internal/http2/ErrorCode;)V
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1
name = null
.end annotation
# instance fields
.field public final synthetic this$0:Lokhttp3/internal/http2/Http2Connection;
.field public final synthetic val$errorCode:Lokhttp3/internal/http2/ErrorCode;
.field public final synthetic val$streamId:I
# direct methods
.method public varargs constructor <init>(Lokhttp3/internal/http2/Http2Connection;Ljava/lang/String;[Ljava/lang/Object;ILokhttp3/internal/http2/ErrorCode;)V
.locals 0
iput-object p1, p0, Lokhttp3/internal/http2/Http2Connection$1;->this$0:Lokhttp3/internal/http2/Http2Connection;
iput p4, p0, Lokhttp3/internal/http2/Http2Connection$1;->val$streamId:I
iput-object p5, p0, Lokhttp3/internal/http2/Http2Connection$1;->val$errorCode:Lokhttp3/internal/http2/ErrorCode;
.line 334
invoke-direct {p0, p2, p3}, Lokhttp3/internal/NamedRunnable;-><init>(Ljava/lang/String;[Ljava/lang/Object;)V
return-void
.end method
# virtual methods
.method public execute()V
.locals 3
:try_start_0
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection$1;->this$0:Lokhttp3/internal/http2/Http2Connection;
iget v1, p0, Lokhttp3/internal/http2/Http2Connection$1;->val$streamId:I
iget-object v2, p0, Lokhttp3/internal/http2/Http2Connection$1;->val$errorCode:Lokhttp3/internal/http2/ErrorCode;
.line 337
invoke-virtual {v0, v1, v2}, Lokhttp3/internal/http2/Http2Connection;->writeSynReset(ILokhttp3/internal/http2/ErrorCode;)V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
goto :goto_0
:catch_0
move-exception v0
iget-object v1, p0, Lokhttp3/internal/http2/Http2Connection$1;->this$0:Lokhttp3/internal/http2/Http2Connection;
.line 339
invoke-static {v1, v0}, Lokhttp3/internal/http2/Http2Connection;->access$000(Lokhttp3/internal/http2/Http2Connection;Ljava/io/IOException;)V
:goto_0
return-void
.end method

View File

@@ -0,0 +1,72 @@
.class public Lokhttp3/internal/http2/Http2Connection$2;
.super Lokhttp3/internal/NamedRunnable;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lokhttp3/internal/http2/Http2Connection;->writeWindowUpdateLater(IJ)V
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1
name = null
.end annotation
# instance fields
.field public final synthetic this$0:Lokhttp3/internal/http2/Http2Connection;
.field public final synthetic val$streamId:I
.field public final synthetic val$unacknowledgedBytesRead:J
# direct methods
.method public varargs constructor <init>(Lokhttp3/internal/http2/Http2Connection;Ljava/lang/String;[Ljava/lang/Object;IJ)V
.locals 0
iput-object p1, p0, Lokhttp3/internal/http2/Http2Connection$2;->this$0:Lokhttp3/internal/http2/Http2Connection;
iput p4, p0, Lokhttp3/internal/http2/Http2Connection$2;->val$streamId:I
iput-wide p5, p0, Lokhttp3/internal/http2/Http2Connection$2;->val$unacknowledgedBytesRead:J
.line 355
invoke-direct {p0, p2, p3}, Lokhttp3/internal/NamedRunnable;-><init>(Ljava/lang/String;[Ljava/lang/Object;)V
return-void
.end method
# virtual methods
.method public execute()V
.locals 4
:try_start_0
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection$2;->this$0:Lokhttp3/internal/http2/Http2Connection;
.line 358
iget-object v0, v0, Lokhttp3/internal/http2/Http2Connection;->writer:Lokhttp3/internal/http2/Http2Writer;
iget v1, p0, Lokhttp3/internal/http2/Http2Connection$2;->val$streamId:I
iget-wide v2, p0, Lokhttp3/internal/http2/Http2Connection$2;->val$unacknowledgedBytesRead:J
invoke-virtual {v0, v1, v2, v3}, Lokhttp3/internal/http2/Http2Writer;->windowUpdate(IJ)V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
goto :goto_0
:catch_0
move-exception v0
iget-object v1, p0, Lokhttp3/internal/http2/Http2Connection$2;->this$0:Lokhttp3/internal/http2/Http2Connection;
.line 360
invoke-static {v1, v0}, Lokhttp3/internal/http2/Http2Connection;->access$000(Lokhttp3/internal/http2/Http2Connection;Ljava/io/IOException;)V
:goto_0
return-void
.end method

View File

@@ -0,0 +1,48 @@
.class public Lokhttp3/internal/http2/Http2Connection$3;
.super Lokhttp3/internal/NamedRunnable;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lokhttp3/internal/http2/Http2Connection;->sendDegradedPingLater()V
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1
name = null
.end annotation
# instance fields
.field public final synthetic this$0:Lokhttp3/internal/http2/Http2Connection;
# direct methods
.method public varargs constructor <init>(Lokhttp3/internal/http2/Http2Connection;Ljava/lang/String;[Ljava/lang/Object;)V
.locals 0
iput-object p1, p0, Lokhttp3/internal/http2/Http2Connection$3;->this$0:Lokhttp3/internal/http2/Http2Connection;
.line 584
invoke-direct {p0, p2, p3}, Lokhttp3/internal/NamedRunnable;-><init>(Ljava/lang/String;[Ljava/lang/Object;)V
return-void
.end method
# virtual methods
.method public execute()V
.locals 3
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection$3;->this$0:Lokhttp3/internal/http2/Http2Connection;
const/4 v1, 0x0
const/4 v2, 0x2
.line 586
invoke-virtual {v0, v1, v2, v1}, Lokhttp3/internal/http2/Http2Connection;->writePing(ZII)V
return-void
.end method

View File

@@ -0,0 +1,115 @@
.class public Lokhttp3/internal/http2/Http2Connection$4;
.super Lokhttp3/internal/NamedRunnable;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lokhttp3/internal/http2/Http2Connection;->pushRequestLater(ILjava/util/List;)V
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1
name = null
.end annotation
# instance fields
.field public final synthetic this$0:Lokhttp3/internal/http2/Http2Connection;
.field public final synthetic val$requestHeaders:Ljava/util/List;
.field public final synthetic val$streamId:I
# direct methods
.method public varargs constructor <init>(Lokhttp3/internal/http2/Http2Connection;Ljava/lang/String;[Ljava/lang/Object;ILjava/util/List;)V
.locals 0
iput-object p1, p0, Lokhttp3/internal/http2/Http2Connection$4;->this$0:Lokhttp3/internal/http2/Http2Connection;
iput p4, p0, Lokhttp3/internal/http2/Http2Connection$4;->val$streamId:I
iput-object p5, p0, Lokhttp3/internal/http2/Http2Connection$4;->val$requestHeaders:Ljava/util/List;
.line 905
invoke-direct {p0, p2, p3}, Lokhttp3/internal/NamedRunnable;-><init>(Ljava/lang/String;[Ljava/lang/Object;)V
return-void
.end method
# virtual methods
.method public execute()V
.locals 3
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection$4;->this$0:Lokhttp3/internal/http2/Http2Connection;
.line 907
iget-object v0, v0, Lokhttp3/internal/http2/Http2Connection;->pushObserver:Lokhttp3/internal/http2/PushObserver;
iget v1, p0, Lokhttp3/internal/http2/Http2Connection$4;->val$streamId:I
iget-object v2, p0, Lokhttp3/internal/http2/Http2Connection$4;->val$requestHeaders:Ljava/util/List;
invoke-interface {v0, v1, v2}, Lokhttp3/internal/http2/PushObserver;->onRequest(ILjava/util/List;)Z
move-result v0
if-eqz v0, :cond_0
:try_start_0
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection$4;->this$0:Lokhttp3/internal/http2/Http2Connection;
.line 910
iget-object v0, v0, Lokhttp3/internal/http2/Http2Connection;->writer:Lokhttp3/internal/http2/Http2Writer;
iget v1, p0, Lokhttp3/internal/http2/Http2Connection$4;->val$streamId:I
sget-object v2, Lokhttp3/internal/http2/ErrorCode;->CANCEL:Lokhttp3/internal/http2/ErrorCode;
invoke-virtual {v0, v1, v2}, Lokhttp3/internal/http2/Http2Writer;->rstStream(ILokhttp3/internal/http2/ErrorCode;)V
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection$4;->this$0:Lokhttp3/internal/http2/Http2Connection;
.line 911
monitor-enter v0
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
:try_start_1
iget-object v1, p0, Lokhttp3/internal/http2/Http2Connection$4;->this$0:Lokhttp3/internal/http2/Http2Connection;
.line 912
iget-object v1, v1, Lokhttp3/internal/http2/Http2Connection;->currentPushRequests:Ljava/util/Set;
iget v2, p0, Lokhttp3/internal/http2/Http2Connection$4;->val$streamId:I
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v2
invoke-interface {v1, v2}, Ljava/util/Set;->remove(Ljava/lang/Object;)Z
.line 913
monitor-exit v0
goto :goto_0
:catchall_0
move-exception v1
monitor-exit v0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
:try_start_2
throw v1
:try_end_2
.catch Ljava/io/IOException; {:try_start_2 .. :try_end_2} :catch_0
:catch_0
:cond_0
:goto_0
return-void
.end method

View File

@@ -0,0 +1,129 @@
.class public Lokhttp3/internal/http2/Http2Connection$5;
.super Lokhttp3/internal/NamedRunnable;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lokhttp3/internal/http2/Http2Connection;->pushHeadersLater(ILjava/util/List;Z)V
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1
name = null
.end annotation
# instance fields
.field public final synthetic this$0:Lokhttp3/internal/http2/Http2Connection;
.field public final synthetic val$inFinished:Z
.field public final synthetic val$requestHeaders:Ljava/util/List;
.field public final synthetic val$streamId:I
# direct methods
.method public varargs constructor <init>(Lokhttp3/internal/http2/Http2Connection;Ljava/lang/String;[Ljava/lang/Object;ILjava/util/List;Z)V
.locals 0
iput-object p1, p0, Lokhttp3/internal/http2/Http2Connection$5;->this$0:Lokhttp3/internal/http2/Http2Connection;
iput p4, p0, Lokhttp3/internal/http2/Http2Connection$5;->val$streamId:I
iput-object p5, p0, Lokhttp3/internal/http2/Http2Connection$5;->val$requestHeaders:Ljava/util/List;
iput-boolean p6, p0, Lokhttp3/internal/http2/Http2Connection$5;->val$inFinished:Z
.line 928
invoke-direct {p0, p2, p3}, Lokhttp3/internal/NamedRunnable;-><init>(Ljava/lang/String;[Ljava/lang/Object;)V
return-void
.end method
# virtual methods
.method public execute()V
.locals 4
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection$5;->this$0:Lokhttp3/internal/http2/Http2Connection;
.line 930
iget-object v0, v0, Lokhttp3/internal/http2/Http2Connection;->pushObserver:Lokhttp3/internal/http2/PushObserver;
iget v1, p0, Lokhttp3/internal/http2/Http2Connection$5;->val$streamId:I
iget-object v2, p0, Lokhttp3/internal/http2/Http2Connection$5;->val$requestHeaders:Ljava/util/List;
iget-boolean v3, p0, Lokhttp3/internal/http2/Http2Connection$5;->val$inFinished:Z
invoke-interface {v0, v1, v2, v3}, Lokhttp3/internal/http2/PushObserver;->onHeaders(ILjava/util/List;Z)Z
move-result v0
if-eqz v0, :cond_0
:try_start_0
iget-object v1, p0, Lokhttp3/internal/http2/Http2Connection$5;->this$0:Lokhttp3/internal/http2/Http2Connection;
.line 932
iget-object v1, v1, Lokhttp3/internal/http2/Http2Connection;->writer:Lokhttp3/internal/http2/Http2Writer;
iget v2, p0, Lokhttp3/internal/http2/Http2Connection$5;->val$streamId:I
sget-object v3, Lokhttp3/internal/http2/ErrorCode;->CANCEL:Lokhttp3/internal/http2/ErrorCode;
invoke-virtual {v1, v2, v3}, Lokhttp3/internal/http2/Http2Writer;->rstStream(ILokhttp3/internal/http2/ErrorCode;)V
:cond_0
if-nez v0, :cond_1
iget-boolean v0, p0, Lokhttp3/internal/http2/Http2Connection$5;->val$inFinished:Z
if-eqz v0, :cond_2
:cond_1
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection$5;->this$0:Lokhttp3/internal/http2/Http2Connection;
.line 934
monitor-enter v0
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
:try_start_1
iget-object v1, p0, Lokhttp3/internal/http2/Http2Connection$5;->this$0:Lokhttp3/internal/http2/Http2Connection;
.line 935
iget-object v1, v1, Lokhttp3/internal/http2/Http2Connection;->currentPushRequests:Ljava/util/Set;
iget v2, p0, Lokhttp3/internal/http2/Http2Connection$5;->val$streamId:I
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v2
invoke-interface {v1, v2}, Ljava/util/Set;->remove(Ljava/lang/Object;)Z
.line 936
monitor-exit v0
goto :goto_0
:catchall_0
move-exception v1
monitor-exit v0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
:try_start_2
throw v1
:try_end_2
.catch Ljava/io/IOException; {:try_start_2 .. :try_end_2} :catch_0
:catch_0
:cond_2
:goto_0
return-void
.end method

View File

@@ -0,0 +1,135 @@
.class public Lokhttp3/internal/http2/Http2Connection$6;
.super Lokhttp3/internal/NamedRunnable;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lokhttp3/internal/http2/Http2Connection;->pushDataLater(ILokio/BufferedSource;IZ)V
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1
name = null
.end annotation
# instance fields
.field public final synthetic this$0:Lokhttp3/internal/http2/Http2Connection;
.field public final synthetic val$buffer:Lokio/Buffer;
.field public final synthetic val$byteCount:I
.field public final synthetic val$inFinished:Z
.field public final synthetic val$streamId:I
# direct methods
.method public varargs constructor <init>(Lokhttp3/internal/http2/Http2Connection;Ljava/lang/String;[Ljava/lang/Object;ILokio/Buffer;IZ)V
.locals 0
iput-object p1, p0, Lokhttp3/internal/http2/Http2Connection$6;->this$0:Lokhttp3/internal/http2/Http2Connection;
iput p4, p0, Lokhttp3/internal/http2/Http2Connection$6;->val$streamId:I
iput-object p5, p0, Lokhttp3/internal/http2/Http2Connection$6;->val$buffer:Lokio/Buffer;
iput p6, p0, Lokhttp3/internal/http2/Http2Connection$6;->val$byteCount:I
iput-boolean p7, p0, Lokhttp3/internal/http2/Http2Connection$6;->val$inFinished:Z
.line 957
invoke-direct {p0, p2, p3}, Lokhttp3/internal/NamedRunnable;-><init>(Ljava/lang/String;[Ljava/lang/Object;)V
return-void
.end method
# virtual methods
.method public execute()V
.locals 5
:try_start_0
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection$6;->this$0:Lokhttp3/internal/http2/Http2Connection;
.line 960
iget-object v0, v0, Lokhttp3/internal/http2/Http2Connection;->pushObserver:Lokhttp3/internal/http2/PushObserver;
iget v1, p0, Lokhttp3/internal/http2/Http2Connection$6;->val$streamId:I
iget-object v2, p0, Lokhttp3/internal/http2/Http2Connection$6;->val$buffer:Lokio/Buffer;
iget v3, p0, Lokhttp3/internal/http2/Http2Connection$6;->val$byteCount:I
iget-boolean v4, p0, Lokhttp3/internal/http2/Http2Connection$6;->val$inFinished:Z
invoke-interface {v0, v1, v2, v3, v4}, Lokhttp3/internal/http2/PushObserver;->onData(ILokio/BufferedSource;IZ)Z
move-result v0
if-eqz v0, :cond_0
iget-object v1, p0, Lokhttp3/internal/http2/Http2Connection$6;->this$0:Lokhttp3/internal/http2/Http2Connection;
.line 961
iget-object v1, v1, Lokhttp3/internal/http2/Http2Connection;->writer:Lokhttp3/internal/http2/Http2Writer;
iget v2, p0, Lokhttp3/internal/http2/Http2Connection$6;->val$streamId:I
sget-object v3, Lokhttp3/internal/http2/ErrorCode;->CANCEL:Lokhttp3/internal/http2/ErrorCode;
invoke-virtual {v1, v2, v3}, Lokhttp3/internal/http2/Http2Writer;->rstStream(ILokhttp3/internal/http2/ErrorCode;)V
:cond_0
if-nez v0, :cond_1
iget-boolean v0, p0, Lokhttp3/internal/http2/Http2Connection$6;->val$inFinished:Z
if-eqz v0, :cond_2
:cond_1
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection$6;->this$0:Lokhttp3/internal/http2/Http2Connection;
.line 963
monitor-enter v0
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
:try_start_1
iget-object v1, p0, Lokhttp3/internal/http2/Http2Connection$6;->this$0:Lokhttp3/internal/http2/Http2Connection;
.line 964
iget-object v1, v1, Lokhttp3/internal/http2/Http2Connection;->currentPushRequests:Ljava/util/Set;
iget v2, p0, Lokhttp3/internal/http2/Http2Connection$6;->val$streamId:I
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v2
invoke-interface {v1, v2}, Ljava/util/Set;->remove(Ljava/lang/Object;)Z
.line 965
monitor-exit v0
goto :goto_0
:catchall_0
move-exception v1
monitor-exit v0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
:try_start_2
throw v1
:try_end_2
.catch Ljava/io/IOException; {:try_start_2 .. :try_end_2} :catch_0
:catch_0
:cond_2
:goto_0
return-void
.end method

View File

@@ -0,0 +1,89 @@
.class public Lokhttp3/internal/http2/Http2Connection$7;
.super Lokhttp3/internal/NamedRunnable;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lokhttp3/internal/http2/Http2Connection;->pushResetLater(ILokhttp3/internal/http2/ErrorCode;)V
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1
name = null
.end annotation
# instance fields
.field public final synthetic this$0:Lokhttp3/internal/http2/Http2Connection;
.field public final synthetic val$errorCode:Lokhttp3/internal/http2/ErrorCode;
.field public final synthetic val$streamId:I
# direct methods
.method public varargs constructor <init>(Lokhttp3/internal/http2/Http2Connection;Ljava/lang/String;[Ljava/lang/Object;ILokhttp3/internal/http2/ErrorCode;)V
.locals 0
iput-object p1, p0, Lokhttp3/internal/http2/Http2Connection$7;->this$0:Lokhttp3/internal/http2/Http2Connection;
iput p4, p0, Lokhttp3/internal/http2/Http2Connection$7;->val$streamId:I
iput-object p5, p0, Lokhttp3/internal/http2/Http2Connection$7;->val$errorCode:Lokhttp3/internal/http2/ErrorCode;
.line 974
invoke-direct {p0, p2, p3}, Lokhttp3/internal/NamedRunnable;-><init>(Ljava/lang/String;[Ljava/lang/Object;)V
return-void
.end method
# virtual methods
.method public execute()V
.locals 3
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection$7;->this$0:Lokhttp3/internal/http2/Http2Connection;
.line 976
iget-object v0, v0, Lokhttp3/internal/http2/Http2Connection;->pushObserver:Lokhttp3/internal/http2/PushObserver;
iget v1, p0, Lokhttp3/internal/http2/Http2Connection$7;->val$streamId:I
iget-object v2, p0, Lokhttp3/internal/http2/Http2Connection$7;->val$errorCode:Lokhttp3/internal/http2/ErrorCode;
invoke-interface {v0, v1, v2}, Lokhttp3/internal/http2/PushObserver;->onReset(ILokhttp3/internal/http2/ErrorCode;)V
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection$7;->this$0:Lokhttp3/internal/http2/Http2Connection;
.line 977
monitor-enter v0
:try_start_0
iget-object v1, p0, Lokhttp3/internal/http2/Http2Connection$7;->this$0:Lokhttp3/internal/http2/Http2Connection;
.line 978
iget-object v1, v1, Lokhttp3/internal/http2/Http2Connection;->currentPushRequests:Ljava/util/Set;
iget v2, p0, Lokhttp3/internal/http2/Http2Connection$7;->val$streamId:I
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v2
invoke-interface {v1, v2}, Ljava/util/Set;->remove(Ljava/lang/Object;)Z
.line 979
monitor-exit v0
return-void
:catchall_0
move-exception v1
monitor-exit v0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
throw v1
.end method

View File

@@ -0,0 +1,98 @@
.class public Lokhttp3/internal/http2/Http2Connection$Builder;
.super Ljava/lang/Object;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lokhttp3/internal/http2/Http2Connection;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x9
name = "Builder"
.end annotation
# instance fields
.field public client:Z
.field public connectionName:Ljava/lang/String;
.field public listener:Lokhttp3/internal/http2/Http2Connection$Listener;
.field public pingIntervalMillis:I
.field public pushObserver:Lokhttp3/internal/http2/PushObserver;
.field public sink:Lokio/BufferedSink;
.field public socket:Ljava/net/Socket;
.field public source:Lokio/BufferedSource;
# direct methods
.method public constructor <init>(Z)V
.locals 1
.line 608
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 599
sget-object v0, Lokhttp3/internal/http2/Http2Connection$Listener;->REFUSE_INCOMING_STREAMS:Lokhttp3/internal/http2/Http2Connection$Listener;
iput-object v0, p0, Lokhttp3/internal/http2/Http2Connection$Builder;->listener:Lokhttp3/internal/http2/Http2Connection$Listener;
.line 600
sget-object v0, Lokhttp3/internal/http2/PushObserver;->CANCEL:Lokhttp3/internal/http2/PushObserver;
iput-object v0, p0, Lokhttp3/internal/http2/Http2Connection$Builder;->pushObserver:Lokhttp3/internal/http2/PushObserver;
iput-boolean p1, p0, Lokhttp3/internal/http2/Http2Connection$Builder;->client:Z
return-void
.end method
# virtual methods
.method public build()Lokhttp3/internal/http2/Http2Connection;
.locals 1
.line 646
new-instance v0, Lokhttp3/internal/http2/Http2Connection;
invoke-direct {v0, p0}, Lokhttp3/internal/http2/Http2Connection;-><init>(Lokhttp3/internal/http2/Http2Connection$Builder;)V
return-object v0
.end method
.method public listener(Lokhttp3/internal/http2/Http2Connection$Listener;)Lokhttp3/internal/http2/Http2Connection$Builder;
.locals 0
iput-object p1, p0, Lokhttp3/internal/http2/Http2Connection$Builder;->listener:Lokhttp3/internal/http2/Http2Connection$Listener;
return-object p0
.end method
.method public pingIntervalMillis(I)Lokhttp3/internal/http2/Http2Connection$Builder;
.locals 0
iput p1, p0, Lokhttp3/internal/http2/Http2Connection$Builder;->pingIntervalMillis:I
return-object p0
.end method
.method public socket(Ljava/net/Socket;Ljava/lang/String;Lokio/BufferedSource;Lokio/BufferedSink;)Lokhttp3/internal/http2/Http2Connection$Builder;
.locals 0
iput-object p1, p0, Lokhttp3/internal/http2/Http2Connection$Builder;->socket:Ljava/net/Socket;
iput-object p2, p0, Lokhttp3/internal/http2/Http2Connection$Builder;->connectionName:Ljava/lang/String;
iput-object p3, p0, Lokhttp3/internal/http2/Http2Connection$Builder;->source:Lokio/BufferedSource;
iput-object p4, p0, Lokhttp3/internal/http2/Http2Connection$Builder;->sink:Lokio/BufferedSink;
return-object p0
.end method

View File

@@ -0,0 +1,121 @@
.class public final Lokhttp3/internal/http2/Http2Connection$IntervalPingRunnable;
.super Lokhttp3/internal/NamedRunnable;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lokhttp3/internal/http2/Http2Connection;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x11
name = "IntervalPingRunnable"
.end annotation
# instance fields
.field public final synthetic this$0:Lokhttp3/internal/http2/Http2Connection;
# direct methods
.method public constructor <init>(Lokhttp3/internal/http2/Http2Connection;)V
.locals 1
iput-object p1, p0, Lokhttp3/internal/http2/Http2Connection$IntervalPingRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
.line 388
iget-object p1, p1, Lokhttp3/internal/http2/Http2Connection;->connectionName:Ljava/lang/String;
filled-new-array {p1}, [Ljava/lang/Object;
move-result-object p1
const-string v0, "OkHttp %s ping"
invoke-direct {p0, v0, p1}, Lokhttp3/internal/NamedRunnable;-><init>(Ljava/lang/String;[Ljava/lang/Object;)V
return-void
.end method
# virtual methods
.method public execute()V
.locals 5
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection$IntervalPingRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
.line 393
monitor-enter v0
:try_start_0
iget-object v1, p0, Lokhttp3/internal/http2/Http2Connection$IntervalPingRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
.line 394
invoke-static {v1}, Lokhttp3/internal/http2/Http2Connection;->access$100(Lokhttp3/internal/http2/Http2Connection;)J
move-result-wide v1
iget-object v3, p0, Lokhttp3/internal/http2/Http2Connection$IntervalPingRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
invoke-static {v3}, Lokhttp3/internal/http2/Http2Connection;->access$200(Lokhttp3/internal/http2/Http2Connection;)J
move-result-wide v3
cmp-long v1, v1, v3
const/4 v2, 0x1
const/4 v3, 0x0
if-gez v1, :cond_0
move v1, v2
goto :goto_0
:cond_0
iget-object v1, p0, Lokhttp3/internal/http2/Http2Connection$IntervalPingRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
.line 397
invoke-static {v1}, Lokhttp3/internal/http2/Http2Connection;->access$208(Lokhttp3/internal/http2/Http2Connection;)J
move v1, v3
.line 400
:goto_0
monitor-exit v0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
if-eqz v1, :cond_1
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection$IntervalPingRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
const/4 v1, 0x0
.line 402
invoke-static {v0, v1}, Lokhttp3/internal/http2/Http2Connection;->access$000(Lokhttp3/internal/http2/Http2Connection;Ljava/io/IOException;)V
goto :goto_1
:cond_1
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection$IntervalPingRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
.line 404
invoke-virtual {v0, v3, v2, v3}, Lokhttp3/internal/http2/Http2Connection;->writePing(ZII)V
:goto_1
return-void
:catchall_0
move-exception v1
.line 400
:try_start_1
monitor-exit v0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
throw v1
.end method

View File

@@ -0,0 +1,40 @@
.class public Lokhttp3/internal/http2/Http2Connection$Listener$1;
.super Lokhttp3/internal/http2/Http2Connection$Listener;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lokhttp3/internal/http2/Http2Connection$Listener;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1
name = null
.end annotation
# direct methods
.method public constructor <init>()V
.locals 0
.line 992
invoke-direct {p0}, Lokhttp3/internal/http2/Http2Connection$Listener;-><init>()V
return-void
.end method
# virtual methods
.method public onStream(Lokhttp3/internal/http2/Http2Stream;)V
.locals 2
.line 994
sget-object v0, Lokhttp3/internal/http2/ErrorCode;->REFUSED_STREAM:Lokhttp3/internal/http2/ErrorCode;
const/4 v1, 0x0
invoke-virtual {p1, v0, v1}, Lokhttp3/internal/http2/Http2Stream;->close(Lokhttp3/internal/http2/ErrorCode;Ljava/io/IOException;)V
return-void
.end method

View File

@@ -0,0 +1,53 @@
.class public abstract Lokhttp3/internal/http2/Http2Connection$Listener;
.super Ljava/lang/Object;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lokhttp3/internal/http2/Http2Connection;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x409
name = "Listener"
.end annotation
# static fields
.field public static final REFUSE_INCOMING_STREAMS:Lokhttp3/internal/http2/Http2Connection$Listener;
# direct methods
.method static constructor <clinit>()V
.locals 1
.line 992
new-instance v0, Lokhttp3/internal/http2/Http2Connection$Listener$1;
invoke-direct {v0}, Lokhttp3/internal/http2/Http2Connection$Listener$1;-><init>()V
sput-object v0, Lokhttp3/internal/http2/Http2Connection$Listener;->REFUSE_INCOMING_STREAMS:Lokhttp3/internal/http2/Http2Connection$Listener;
return-void
.end method
.method public constructor <init>()V
.locals 0
.line 991
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public onSettings(Lokhttp3/internal/http2/Http2Connection;)V
.locals 0
return-void
.end method
.method public abstract onStream(Lokhttp3/internal/http2/Http2Stream;)V
.end method

View File

@@ -0,0 +1,78 @@
.class public final Lokhttp3/internal/http2/Http2Connection$PingRunnable;
.super Lokhttp3/internal/NamedRunnable;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lokhttp3/internal/http2/Http2Connection;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x11
name = "PingRunnable"
.end annotation
# instance fields
.field public final payload1:I
.field public final payload2:I
.field public final reply:Z
.field public final synthetic this$0:Lokhttp3/internal/http2/Http2Connection;
# direct methods
.method public constructor <init>(Lokhttp3/internal/http2/Http2Connection;ZII)V
.locals 2
iput-object p1, p0, Lokhttp3/internal/http2/Http2Connection$PingRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
.line 375
iget-object p1, p1, Lokhttp3/internal/http2/Http2Connection;->connectionName:Ljava/lang/String;
invoke-static {p3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v0
invoke-static {p4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v1
filled-new-array {p1, v0, v1}, [Ljava/lang/Object;
move-result-object p1
const-string v0, "OkHttp %s ping %08x%08x"
invoke-direct {p0, v0, p1}, Lokhttp3/internal/NamedRunnable;-><init>(Ljava/lang/String;[Ljava/lang/Object;)V
iput-boolean p2, p0, Lokhttp3/internal/http2/Http2Connection$PingRunnable;->reply:Z
iput p3, p0, Lokhttp3/internal/http2/Http2Connection$PingRunnable;->payload1:I
iput p4, p0, Lokhttp3/internal/http2/Http2Connection$PingRunnable;->payload2:I
return-void
.end method
# virtual methods
.method public execute()V
.locals 4
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection$PingRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
iget-boolean v1, p0, Lokhttp3/internal/http2/Http2Connection$PingRunnable;->reply:Z
iget v2, p0, Lokhttp3/internal/http2/Http2Connection$PingRunnable;->payload1:I
iget v3, p0, Lokhttp3/internal/http2/Http2Connection$PingRunnable;->payload2:I
.line 382
invoke-virtual {v0, v1, v2, v3}, Lokhttp3/internal/http2/Http2Connection;->writePing(ZII)V
return-void
.end method

View File

@@ -0,0 +1,103 @@
.class public Lokhttp3/internal/http2/Http2Connection$ReaderRunnable$1;
.super Lokhttp3/internal/NamedRunnable;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->headers(ZIILjava/util/List;)V
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1
name = null
.end annotation
# instance fields
.field public final synthetic this$1:Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;
.field public final synthetic val$newStream:Lokhttp3/internal/http2/Http2Stream;
# direct methods
.method public varargs constructor <init>(Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;Ljava/lang/String;[Ljava/lang/Object;Lokhttp3/internal/http2/Http2Stream;)V
.locals 0
iput-object p1, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable$1;->this$1:Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;
iput-object p4, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable$1;->val$newStream:Lokhttp3/internal/http2/Http2Stream;
.line 728
invoke-direct {p0, p2, p3}, Lokhttp3/internal/NamedRunnable;-><init>(Ljava/lang/String;[Ljava/lang/Object;)V
return-void
.end method
# virtual methods
.method public execute()V
.locals 4
:try_start_0
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable$1;->this$1:Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;
.line 731
iget-object v0, v0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
iget-object v0, v0, Lokhttp3/internal/http2/Http2Connection;->listener:Lokhttp3/internal/http2/Http2Connection$Listener;
iget-object v1, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable$1;->val$newStream:Lokhttp3/internal/http2/Http2Stream;
invoke-virtual {v0, v1}, Lokhttp3/internal/http2/Http2Connection$Listener;->onStream(Lokhttp3/internal/http2/Http2Stream;)V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
goto :goto_0
:catch_0
move-exception v0
.line 733
invoke-static {}, Lokhttp3/internal/platform/Platform;->get()Lokhttp3/internal/platform/Platform;
move-result-object v1
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
const-string v3, "Http2Connection.Listener failure for "
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object v3, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable$1;->this$1:Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;
iget-object v3, v3, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
iget-object v3, v3, Lokhttp3/internal/http2/Http2Connection;->connectionName:Ljava/lang/String;
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
const/4 v3, 0x4
invoke-virtual {v1, v3, v2, v0}, Lokhttp3/internal/platform/Platform;->log(ILjava/lang/String;Ljava/lang/Throwable;)V
:try_start_1
iget-object v1, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable$1;->val$newStream:Lokhttp3/internal/http2/Http2Stream;
.line 736
sget-object v2, Lokhttp3/internal/http2/ErrorCode;->PROTOCOL_ERROR:Lokhttp3/internal/http2/ErrorCode;
invoke-virtual {v1, v2, v0}, Lokhttp3/internal/http2/Http2Stream;->close(Lokhttp3/internal/http2/ErrorCode;Ljava/io/IOException;)V
:try_end_1
.catch Ljava/io/IOException; {:try_start_1 .. :try_end_1} :catch_1
:catch_1
:goto_0
return-void
.end method

View File

@@ -0,0 +1,56 @@
.class public Lokhttp3/internal/http2/Http2Connection$ReaderRunnable$2;
.super Lokhttp3/internal/NamedRunnable;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->settings(ZLokhttp3/internal/http2/Settings;)V
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1
name = null
.end annotation
# instance fields
.field public final synthetic this$1:Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;
.field public final synthetic val$clearPrevious:Z
.field public final synthetic val$settings:Lokhttp3/internal/http2/Settings;
# direct methods
.method public varargs constructor <init>(Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;Ljava/lang/String;[Ljava/lang/Object;ZLokhttp3/internal/http2/Settings;)V
.locals 0
iput-object p1, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable$2;->this$1:Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;
iput-boolean p4, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable$2;->val$clearPrevious:Z
iput-object p5, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable$2;->val$settings:Lokhttp3/internal/http2/Settings;
.line 763
invoke-direct {p0, p2, p3}, Lokhttp3/internal/NamedRunnable;-><init>(Ljava/lang/String;[Ljava/lang/Object;)V
return-void
.end method
# virtual methods
.method public execute()V
.locals 3
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable$2;->this$1:Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;
iget-boolean v1, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable$2;->val$clearPrevious:Z
iget-object v2, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable$2;->val$settings:Lokhttp3/internal/http2/Settings;
.line 765
invoke-virtual {v0, v1, v2}, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->applyAndAckSettings(ZLokhttp3/internal/http2/Settings;)V
return-void
.end method

View File

@@ -0,0 +1,48 @@
.class public Lokhttp3/internal/http2/Http2Connection$ReaderRunnable$3;
.super Lokhttp3/internal/NamedRunnable;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->applyAndAckSettings(ZLokhttp3/internal/http2/Settings;)V
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1
name = null
.end annotation
# instance fields
.field public final synthetic this$1:Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;
# direct methods
.method public varargs constructor <init>(Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;Ljava/lang/String;[Ljava/lang/Object;)V
.locals 0
iput-object p1, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable$3;->this$1:Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;
.line 802
invoke-direct {p0, p2, p3}, Lokhttp3/internal/NamedRunnable;-><init>(Ljava/lang/String;[Ljava/lang/Object;)V
return-void
.end method
# virtual methods
.method public execute()V
.locals 2
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable$3;->this$1:Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;
.line 804
iget-object v0, v0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
iget-object v1, v0, Lokhttp3/internal/http2/Http2Connection;->listener:Lokhttp3/internal/http2/Http2Connection$Listener;
invoke-virtual {v1, v0}, Lokhttp3/internal/http2/Http2Connection$Listener;->onSettings(Lokhttp3/internal/http2/Http2Connection;)V
return-void
.end method

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,652 @@
.class public final Lokhttp3/internal/http2/Http2ExchangeCodec;
.super Ljava/lang/Object;
.source "SourceFile"
# interfaces
.implements Lokhttp3/internal/http/ExchangeCodec;
# static fields
.field public static final HTTP_2_SKIPPED_REQUEST_HEADERS:Ljava/util/List;
.field public static final HTTP_2_SKIPPED_RESPONSE_HEADERS:Ljava/util/List;
# instance fields
.field public volatile canceled:Z
.field public final chain:Lokhttp3/Interceptor$Chain;
.field public final connection:Lokhttp3/internal/http2/Http2Connection;
.field public final protocol:Lokhttp3/Protocol;
.field public final realConnection:Lokhttp3/internal/connection/RealConnection;
.field public volatile stream:Lokhttp3/internal/http2/Http2Stream;
# direct methods
.method static constructor <clinit>()V
.locals 12
const-string v0, "connection"
const-string v1, "host"
const-string v2, "keep-alive"
const-string v3, "proxy-connection"
const-string v4, "te"
const-string v5, "transfer-encoding"
const-string v6, "encoding"
const-string v7, "upgrade"
const-string v8, ":method"
const-string v9, ":path"
const-string v10, ":scheme"
const-string v11, ":authority"
filled-new-array/range {v0 .. v11}, [Ljava/lang/String;
move-result-object v0
.line 63
invoke-static {v0}, Lokhttp3/internal/Util;->immutableList([Ljava/lang/Object;)Ljava/util/List;
move-result-object v0
sput-object v0, Lokhttp3/internal/http2/Http2ExchangeCodec;->HTTP_2_SKIPPED_REQUEST_HEADERS:Ljava/util/List;
const-string v1, "connection"
const-string v2, "host"
const-string v3, "keep-alive"
const-string v4, "proxy-connection"
const-string v5, "te"
const-string v6, "transfer-encoding"
const-string v7, "encoding"
const-string v8, "upgrade"
filled-new-array/range {v1 .. v8}, [Ljava/lang/String;
move-result-object v0
.line 76
invoke-static {v0}, Lokhttp3/internal/Util;->immutableList([Ljava/lang/Object;)Ljava/util/List;
move-result-object v0
sput-object v0, Lokhttp3/internal/http2/Http2ExchangeCodec;->HTTP_2_SKIPPED_RESPONSE_HEADERS:Ljava/util/List;
return-void
.end method
.method public constructor <init>(Lokhttp3/OkHttpClient;Lokhttp3/internal/connection/RealConnection;Lokhttp3/Interceptor$Chain;Lokhttp3/internal/http2/Http2Connection;)V
.locals 0
.line 94
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p2, p0, Lokhttp3/internal/http2/Http2ExchangeCodec;->realConnection:Lokhttp3/internal/connection/RealConnection;
iput-object p3, p0, Lokhttp3/internal/http2/Http2ExchangeCodec;->chain:Lokhttp3/Interceptor$Chain;
iput-object p4, p0, Lokhttp3/internal/http2/Http2ExchangeCodec;->connection:Lokhttp3/internal/http2/Http2Connection;
.line 98
invoke-virtual {p1}, Lokhttp3/OkHttpClient;->protocols()Ljava/util/List;
move-result-object p1
sget-object p2, Lokhttp3/Protocol;->H2_PRIOR_KNOWLEDGE:Lokhttp3/Protocol;
invoke-interface {p1, p2}, Ljava/util/List;->contains(Ljava/lang/Object;)Z
move-result p1
if-eqz p1, :cond_0
goto :goto_0
.line 100
:cond_0
sget-object p2, Lokhttp3/Protocol;->HTTP_2:Lokhttp3/Protocol;
:goto_0
iput-object p2, p0, Lokhttp3/internal/http2/Http2ExchangeCodec;->protocol:Lokhttp3/Protocol;
return-void
.end method
.method public static http2HeadersList(Lokhttp3/Request;)Ljava/util/List;
.locals 6
.line 145
invoke-virtual {p0}, Lokhttp3/Request;->headers()Lokhttp3/Headers;
move-result-object v0
.line 146
new-instance v1, Ljava/util/ArrayList;
invoke-virtual {v0}, Lokhttp3/Headers;->size()I
move-result v2
add-int/lit8 v2, v2, 0x4
invoke-direct {v1, v2}, Ljava/util/ArrayList;-><init>(I)V
.line 147
new-instance v2, Lokhttp3/internal/http2/Header;
sget-object v3, Lokhttp3/internal/http2/Header;->TARGET_METHOD:Lokio/ByteString;
invoke-virtual {p0}, Lokhttp3/Request;->method()Ljava/lang/String;
move-result-object v4
invoke-direct {v2, v3, v4}, Lokhttp3/internal/http2/Header;-><init>(Lokio/ByteString;Ljava/lang/String;)V
invoke-interface {v1, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z
.line 148
new-instance v2, Lokhttp3/internal/http2/Header;
sget-object v3, Lokhttp3/internal/http2/Header;->TARGET_PATH:Lokio/ByteString;
invoke-virtual {p0}, Lokhttp3/Request;->url()Lokhttp3/HttpUrl;
move-result-object v4
invoke-static {v4}, Lokhttp3/internal/http/RequestLine;->requestPath(Lokhttp3/HttpUrl;)Ljava/lang/String;
move-result-object v4
invoke-direct {v2, v3, v4}, Lokhttp3/internal/http2/Header;-><init>(Lokio/ByteString;Ljava/lang/String;)V
invoke-interface {v1, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z
const-string v2, "Host"
.line 149
invoke-virtual {p0, v2}, Lokhttp3/Request;->header(Ljava/lang/String;)Ljava/lang/String;
move-result-object v2
if-eqz v2, :cond_0
.line 151
new-instance v3, Lokhttp3/internal/http2/Header;
sget-object v4, Lokhttp3/internal/http2/Header;->TARGET_AUTHORITY:Lokio/ByteString;
invoke-direct {v3, v4, v2}, Lokhttp3/internal/http2/Header;-><init>(Lokio/ByteString;Ljava/lang/String;)V
invoke-interface {v1, v3}, Ljava/util/List;->add(Ljava/lang/Object;)Z
.line 153
:cond_0
new-instance v2, Lokhttp3/internal/http2/Header;
sget-object v3, Lokhttp3/internal/http2/Header;->TARGET_SCHEME:Lokio/ByteString;
invoke-virtual {p0}, Lokhttp3/Request;->url()Lokhttp3/HttpUrl;
move-result-object p0
invoke-virtual {p0}, Lokhttp3/HttpUrl;->scheme()Ljava/lang/String;
move-result-object p0
invoke-direct {v2, v3, p0}, Lokhttp3/internal/http2/Header;-><init>(Lokio/ByteString;Ljava/lang/String;)V
invoke-interface {v1, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z
.line 155
invoke-virtual {v0}, Lokhttp3/Headers;->size()I
move-result p0
const/4 v2, 0x0
:goto_0
if-ge v2, p0, :cond_3
.line 157
invoke-virtual {v0, v2}, Lokhttp3/Headers;->name(I)Ljava/lang/String;
move-result-object v3
sget-object v4, Ljava/util/Locale;->US:Ljava/util/Locale;
invoke-virtual {v3, v4}, Ljava/lang/String;->toLowerCase(Ljava/util/Locale;)Ljava/lang/String;
move-result-object v3
sget-object v4, Lokhttp3/internal/http2/Http2ExchangeCodec;->HTTP_2_SKIPPED_REQUEST_HEADERS:Ljava/util/List;
.line 158
invoke-interface {v4, v3}, Ljava/util/List;->contains(Ljava/lang/Object;)Z
move-result v4
if-eqz v4, :cond_1
const-string v4, "te"
.line 159
invoke-virtual {v3, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v4
if-eqz v4, :cond_2
invoke-virtual {v0, v2}, Lokhttp3/Headers;->value(I)Ljava/lang/String;
move-result-object v4
const-string v5, "trailers"
invoke-virtual {v4, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v4
if-eqz v4, :cond_2
.line 160
:cond_1
new-instance v4, Lokhttp3/internal/http2/Header;
invoke-virtual {v0, v2}, Lokhttp3/Headers;->value(I)Ljava/lang/String;
move-result-object v5
invoke-direct {v4, v3, v5}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
invoke-interface {v1, v4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
:cond_2
add-int/lit8 v2, v2, 0x1
goto :goto_0
:cond_3
return-object v1
.end method
.method public static readHttp2HeadersList(Lokhttp3/Headers;Lokhttp3/Protocol;)Lokhttp3/Response$Builder;
.locals 7
.line 170
new-instance v0, Lokhttp3/Headers$Builder;
invoke-direct {v0}, Lokhttp3/Headers$Builder;-><init>()V
.line 171
invoke-virtual {p0}, Lokhttp3/Headers;->size()I
move-result v1
const/4 v2, 0x0
const/4 v3, 0x0
:goto_0
if-ge v3, v1, :cond_2
.line 172
invoke-virtual {p0, v3}, Lokhttp3/Headers;->name(I)Ljava/lang/String;
move-result-object v4
.line 173
invoke-virtual {p0, v3}, Lokhttp3/Headers;->value(I)Ljava/lang/String;
move-result-object v5
const-string v6, ":status"
.line 174
invoke-virtual {v4, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v6
if-eqz v6, :cond_0
.line 175
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
const-string v4, "HTTP/1.1 "
invoke-virtual {v2, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v2, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
invoke-static {v2}, Lokhttp3/internal/http/StatusLine;->parse(Ljava/lang/String;)Lokhttp3/internal/http/StatusLine;
move-result-object v2
goto :goto_1
:cond_0
sget-object v6, Lokhttp3/internal/http2/Http2ExchangeCodec;->HTTP_2_SKIPPED_RESPONSE_HEADERS:Ljava/util/List;
.line 176
invoke-interface {v6, v4}, Ljava/util/List;->contains(Ljava/lang/Object;)Z
move-result v6
if-nez v6, :cond_1
sget-object v6, Lokhttp3/internal/Internal;->instance:Lokhttp3/internal/Internal;
.line 177
invoke-virtual {v6, v0, v4, v5}, Lokhttp3/internal/Internal;->addLenient(Lokhttp3/Headers$Builder;Ljava/lang/String;Ljava/lang/String;)V
:cond_1
:goto_1
add-int/lit8 v3, v3, 0x1
goto :goto_0
:cond_2
if-eqz v2, :cond_3
.line 182
new-instance p0, Lokhttp3/Response$Builder;
invoke-direct {p0}, Lokhttp3/Response$Builder;-><init>()V
.line 183
invoke-virtual {p0, p1}, Lokhttp3/Response$Builder;->protocol(Lokhttp3/Protocol;)Lokhttp3/Response$Builder;
move-result-object p0
iget p1, v2, Lokhttp3/internal/http/StatusLine;->code:I
.line 184
invoke-virtual {p0, p1}, Lokhttp3/Response$Builder;->code(I)Lokhttp3/Response$Builder;
move-result-object p0
iget-object p1, v2, Lokhttp3/internal/http/StatusLine;->message:Ljava/lang/String;
.line 185
invoke-virtual {p0, p1}, Lokhttp3/Response$Builder;->message(Ljava/lang/String;)Lokhttp3/Response$Builder;
move-result-object p0
.line 186
invoke-virtual {v0}, Lokhttp3/Headers$Builder;->build()Lokhttp3/Headers;
move-result-object p1
invoke-virtual {p0, p1}, Lokhttp3/Response$Builder;->headers(Lokhttp3/Headers;)Lokhttp3/Response$Builder;
move-result-object p0
return-object p0
.line 180
:cond_3
new-instance p0, Ljava/net/ProtocolException;
const-string p1, "Expected \':status\' header not present"
invoke-direct {p0, p1}, Ljava/net/ProtocolException;-><init>(Ljava/lang/String;)V
throw p0
.end method
# virtual methods
.method public cancel()V
.locals 2
const/4 v0, 0x1
iput-boolean v0, p0, Lokhttp3/internal/http2/Http2ExchangeCodec;->canceled:Z
iget-object v0, p0, Lokhttp3/internal/http2/Http2ExchangeCodec;->stream:Lokhttp3/internal/http2/Http2Stream;
if-eqz v0, :cond_0
iget-object v0, p0, Lokhttp3/internal/http2/Http2ExchangeCodec;->stream:Lokhttp3/internal/http2/Http2Stream;
.line 203
sget-object v1, Lokhttp3/internal/http2/ErrorCode;->CANCEL:Lokhttp3/internal/http2/ErrorCode;
invoke-virtual {v0, v1}, Lokhttp3/internal/http2/Http2Stream;->closeLater(Lokhttp3/internal/http2/ErrorCode;)V
:cond_0
return-void
.end method
.method public connection()Lokhttp3/internal/connection/RealConnection;
.locals 1
iget-object v0, p0, Lokhttp3/internal/http2/Http2ExchangeCodec;->realConnection:Lokhttp3/internal/connection/RealConnection;
return-object v0
.end method
.method public createRequestBody(Lokhttp3/Request;J)Lokio/Sink;
.locals 0
iget-object p1, p0, Lokhttp3/internal/http2/Http2ExchangeCodec;->stream:Lokhttp3/internal/http2/Http2Stream;
.line 108
invoke-virtual {p1}, Lokhttp3/internal/http2/Http2Stream;->getSink()Lokio/Sink;
move-result-object p1
return-object p1
.end method
.method public finishRequest()V
.locals 1
iget-object v0, p0, Lokhttp3/internal/http2/Http2ExchangeCodec;->stream:Lokhttp3/internal/http2/Http2Stream;
.line 132
invoke-virtual {v0}, Lokhttp3/internal/http2/Http2Stream;->getSink()Lokio/Sink;
move-result-object v0
invoke-interface {v0}, Lokio/Sink;->close()V
return-void
.end method
.method public flushRequest()V
.locals 1
iget-object v0, p0, Lokhttp3/internal/http2/Http2ExchangeCodec;->connection:Lokhttp3/internal/http2/Http2Connection;
.line 128
invoke-virtual {v0}, Lokhttp3/internal/http2/Http2Connection;->flush()V
return-void
.end method
.method public openResponseBodySource(Lokhttp3/Response;)Lokio/Source;
.locals 0
iget-object p1, p0, Lokhttp3/internal/http2/Http2ExchangeCodec;->stream:Lokhttp3/internal/http2/Http2Stream;
.line 194
invoke-virtual {p1}, Lokhttp3/internal/http2/Http2Stream;->getSource()Lokio/Source;
move-result-object p1
return-object p1
.end method
.method public readResponseHeaders(Z)Lokhttp3/Response$Builder;
.locals 2
iget-object v0, p0, Lokhttp3/internal/http2/Http2ExchangeCodec;->stream:Lokhttp3/internal/http2/Http2Stream;
.line 136
invoke-virtual {v0}, Lokhttp3/internal/http2/Http2Stream;->takeHeaders()Lokhttp3/Headers;
move-result-object v0
iget-object v1, p0, Lokhttp3/internal/http2/Http2ExchangeCodec;->protocol:Lokhttp3/Protocol;
.line 137
invoke-static {v0, v1}, Lokhttp3/internal/http2/Http2ExchangeCodec;->readHttp2HeadersList(Lokhttp3/Headers;Lokhttp3/Protocol;)Lokhttp3/Response$Builder;
move-result-object v0
if-eqz p1, :cond_0
sget-object p1, Lokhttp3/internal/Internal;->instance:Lokhttp3/internal/Internal;
.line 138
invoke-virtual {p1, v0}, Lokhttp3/internal/Internal;->code(Lokhttp3/Response$Builder;)I
move-result p1
const/16 v1, 0x64
if-ne p1, v1, :cond_0
const/4 p1, 0x0
return-object p1
:cond_0
return-object v0
.end method
.method public reportedContentLength(Lokhttp3/Response;)J
.locals 2
.line 190
invoke-static {p1}, Lokhttp3/internal/http/HttpHeaders;->contentLength(Lokhttp3/Response;)J
move-result-wide v0
return-wide v0
.end method
.method public writeRequestHeaders(Lokhttp3/Request;)V
.locals 3
iget-object v0, p0, Lokhttp3/internal/http2/Http2ExchangeCodec;->stream:Lokhttp3/internal/http2/Http2Stream;
if-eqz v0, :cond_0
return-void
.line 114
:cond_0
invoke-virtual {p1}, Lokhttp3/Request;->body()Lokhttp3/RequestBody;
move-result-object v0
if-eqz v0, :cond_1
const/4 v0, 0x1
goto :goto_0
:cond_1
const/4 v0, 0x0
.line 115
:goto_0
invoke-static {p1}, Lokhttp3/internal/http2/Http2ExchangeCodec;->http2HeadersList(Lokhttp3/Request;)Ljava/util/List;
move-result-object p1
iget-object v1, p0, Lokhttp3/internal/http2/Http2ExchangeCodec;->connection:Lokhttp3/internal/http2/Http2Connection;
.line 116
invoke-virtual {v1, p1, v0}, Lokhttp3/internal/http2/Http2Connection;->newStream(Ljava/util/List;Z)Lokhttp3/internal/http2/Http2Stream;
move-result-object p1
iput-object p1, p0, Lokhttp3/internal/http2/Http2ExchangeCodec;->stream:Lokhttp3/internal/http2/Http2Stream;
iget-boolean p1, p0, Lokhttp3/internal/http2/Http2ExchangeCodec;->canceled:Z
if-nez p1, :cond_2
iget-object p1, p0, Lokhttp3/internal/http2/Http2ExchangeCodec;->stream:Lokhttp3/internal/http2/Http2Stream;
.line 123
invoke-virtual {p1}, Lokhttp3/internal/http2/Http2Stream;->readTimeout()Lokio/Timeout;
move-result-object p1
iget-object v0, p0, Lokhttp3/internal/http2/Http2ExchangeCodec;->chain:Lokhttp3/Interceptor$Chain;
invoke-interface {v0}, Lokhttp3/Interceptor$Chain;->readTimeoutMillis()I
move-result v0
int-to-long v0, v0
sget-object v2, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit;
invoke-virtual {p1, v0, v1, v2}, Lokio/Timeout;->timeout(JLjava/util/concurrent/TimeUnit;)Lokio/Timeout;
iget-object p1, p0, Lokhttp3/internal/http2/Http2ExchangeCodec;->stream:Lokhttp3/internal/http2/Http2Stream;
.line 124
invoke-virtual {p1}, Lokhttp3/internal/http2/Http2Stream;->writeTimeout()Lokio/Timeout;
move-result-object p1
iget-object v0, p0, Lokhttp3/internal/http2/Http2ExchangeCodec;->chain:Lokhttp3/Interceptor$Chain;
invoke-interface {v0}, Lokhttp3/Interceptor$Chain;->writeTimeoutMillis()I
move-result v0
int-to-long v0, v0
invoke-virtual {p1, v0, v1, v2}, Lokio/Timeout;->timeout(JLjava/util/concurrent/TimeUnit;)Lokio/Timeout;
return-void
:cond_2
iget-object p1, p0, Lokhttp3/internal/http2/Http2ExchangeCodec;->stream:Lokhttp3/internal/http2/Http2Stream;
.line 120
sget-object v0, Lokhttp3/internal/http2/ErrorCode;->CANCEL:Lokhttp3/internal/http2/ErrorCode;
invoke-virtual {p1, v0}, Lokhttp3/internal/http2/Http2Stream;->closeLater(Lokhttp3/internal/http2/ErrorCode;)V
.line 121
new-instance p1, Ljava/io/IOException;
const-string v0, "Canceled"
invoke-direct {p1, v0}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
throw p1
.end method

View File

@@ -0,0 +1,256 @@
.class public final Lokhttp3/internal/http2/Http2Reader$ContinuationSource;
.super Ljava/lang/Object;
.source "SourceFile"
# interfaces
.implements Lokio/Source;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lokhttp3/internal/http2/Http2Reader;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "ContinuationSource"
.end annotation
# instance fields
.field public flags:B
.field public left:I
.field public length:I
.field public padding:S
.field public final source:Lokio/BufferedSource;
.field public streamId:I
# direct methods
.method public constructor <init>(Lokio/BufferedSource;)V
.locals 0
.line 360
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Lokhttp3/internal/http2/Http2Reader$ContinuationSource;->source:Lokio/BufferedSource;
return-void
.end method
# virtual methods
.method public close()V
.locals 0
return-void
.end method
.method public read(Lokio/Buffer;J)J
.locals 6
:goto_0
iget v0, p0, Lokhttp3/internal/http2/Http2Reader$ContinuationSource;->left:I
const-wide/16 v1, -0x1
if-nez v0, :cond_1
iget-object v0, p0, Lokhttp3/internal/http2/Http2Reader$ContinuationSource;->source:Lokio/BufferedSource;
iget-short v3, p0, Lokhttp3/internal/http2/Http2Reader$ContinuationSource;->padding:S
int-to-long v3, v3
.line 366
invoke-interface {v0, v3, v4}, Lokio/BufferedSource;->skip(J)V
const/4 v0, 0x0
iput-short v0, p0, Lokhttp3/internal/http2/Http2Reader$ContinuationSource;->padding:S
iget-byte v0, p0, Lokhttp3/internal/http2/Http2Reader$ContinuationSource;->flags:B
and-int/lit8 v0, v0, 0x4
if-eqz v0, :cond_0
return-wide v1
.line 369
:cond_0
invoke-virtual {p0}, Lokhttp3/internal/http2/Http2Reader$ContinuationSource;->readContinuationHeader()V
goto :goto_0
:cond_1
iget-object v3, p0, Lokhttp3/internal/http2/Http2Reader$ContinuationSource;->source:Lokio/BufferedSource;
int-to-long v4, v0
.line 373
invoke-static {p2, p3, v4, v5}, Ljava/lang/Math;->min(JJ)J
move-result-wide p2
invoke-interface {v3, p1, p2, p3}, Lokio/Source;->read(Lokio/Buffer;J)J
move-result-wide p1
cmp-long p3, p1, v1
if-nez p3, :cond_2
return-wide v1
:cond_2
iget p3, p0, Lokhttp3/internal/http2/Http2Reader$ContinuationSource;->left:I
int-to-long v0, p3
sub-long/2addr v0, p1
long-to-int p3, v0
iput p3, p0, Lokhttp3/internal/http2/Http2Reader$ContinuationSource;->left:I
return-wide p1
.end method
.method public final readContinuationHeader()V
.locals 7
iget v0, p0, Lokhttp3/internal/http2/Http2Reader$ContinuationSource;->streamId:I
iget-object v1, p0, Lokhttp3/internal/http2/Http2Reader$ContinuationSource;->source:Lokio/BufferedSource;
.line 389
invoke-static {v1}, Lokhttp3/internal/http2/Http2Reader;->readMedium(Lokio/BufferedSource;)I
move-result v1
iput v1, p0, Lokhttp3/internal/http2/Http2Reader$ContinuationSource;->left:I
iput v1, p0, Lokhttp3/internal/http2/Http2Reader$ContinuationSource;->length:I
iget-object v1, p0, Lokhttp3/internal/http2/Http2Reader$ContinuationSource;->source:Lokio/BufferedSource;
.line 390
invoke-interface {v1}, Lokio/BufferedSource;->readByte()B
move-result v1
and-int/lit16 v1, v1, 0xff
int-to-byte v1, v1
iget-object v2, p0, Lokhttp3/internal/http2/Http2Reader$ContinuationSource;->source:Lokio/BufferedSource;
.line 391
invoke-interface {v2}, Lokio/BufferedSource;->readByte()B
move-result v2
and-int/lit16 v2, v2, 0xff
int-to-byte v2, v2
iput-byte v2, p0, Lokhttp3/internal/http2/Http2Reader$ContinuationSource;->flags:B
.line 392
sget-object v2, Lokhttp3/internal/http2/Http2Reader;->logger:Ljava/util/logging/Logger;
sget-object v3, Ljava/util/logging/Level;->FINE:Ljava/util/logging/Level;
invoke-virtual {v2, v3}, Ljava/util/logging/Logger;->isLoggable(Ljava/util/logging/Level;)Z
move-result v3
if-eqz v3, :cond_0
iget v3, p0, Lokhttp3/internal/http2/Http2Reader$ContinuationSource;->streamId:I
iget v4, p0, Lokhttp3/internal/http2/Http2Reader$ContinuationSource;->length:I
iget-byte v5, p0, Lokhttp3/internal/http2/Http2Reader$ContinuationSource;->flags:B
const/4 v6, 0x1
invoke-static {v6, v3, v4, v1, v5}, Lokhttp3/internal/http2/Http2;->frameLog(ZIIBB)Ljava/lang/String;
move-result-object v3
invoke-virtual {v2, v3}, Ljava/util/logging/Logger;->fine(Ljava/lang/String;)V
:cond_0
iget-object v2, p0, Lokhttp3/internal/http2/Http2Reader$ContinuationSource;->source:Lokio/BufferedSource;
.line 393
invoke-interface {v2}, Lokio/BufferedSource;->readInt()I
move-result v2
const v3, 0x7fffffff
and-int/2addr v2, v3
iput v2, p0, Lokhttp3/internal/http2/Http2Reader$ContinuationSource;->streamId:I
const/16 v3, 0x9
if-ne v1, v3, :cond_2
if-ne v2, v0, :cond_1
return-void
:cond_1
const/4 v0, 0x0
new-array v0, v0, [Ljava/lang/Object;
const-string v1, "TYPE_CONTINUATION streamId changed"
.line 395
invoke-static {v1, v0}, Lokhttp3/internal/http2/Http2;->ioException(Ljava/lang/String;[Ljava/lang/Object;)Ljava/io/IOException;
move-result-object v0
throw v0
.line 394
:cond_2
invoke-static {v1}, Ljava/lang/Byte;->valueOf(B)Ljava/lang/Byte;
move-result-object v0
filled-new-array {v0}, [Ljava/lang/Object;
move-result-object v0
const-string v1, "%s != TYPE_CONTINUATION"
invoke-static {v1, v0}, Lokhttp3/internal/http2/Http2;->ioException(Ljava/lang/String;[Ljava/lang/Object;)Ljava/io/IOException;
move-result-object v0
throw v0
.end method
.method public timeout()Lokio/Timeout;
.locals 1
iget-object v0, p0, Lokhttp3/internal/http2/Http2Reader$ContinuationSource;->source:Lokio/BufferedSource;
.line 380
invoke-interface {v0}, Lokio/Source;->timeout()Lokio/Timeout;
move-result-object v0
return-object v0
.end method

View File

@@ -0,0 +1,46 @@
.class public interface abstract Lokhttp3/internal/http2/Http2Reader$Handler;
.super Ljava/lang/Object;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lokhttp3/internal/http2/Http2Reader;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x609
name = "Handler"
.end annotation
# virtual methods
.method public abstract ackSettings()V
.end method
.method public abstract data(ZILokio/BufferedSource;I)V
.end method
.method public abstract goAway(ILokhttp3/internal/http2/ErrorCode;Lokio/ByteString;)V
.end method
.method public abstract headers(ZIILjava/util/List;)V
.end method
.method public abstract ping(ZII)V
.end method
.method public abstract priority(IIIZ)V
.end method
.method public abstract pushPromise(IILjava/util/List;)V
.end method
.method public abstract rstStream(ILokhttp3/internal/http2/ErrorCode;)V
.end method
.method public abstract settings(ZLokhttp3/internal/http2/Settings;)V
.end method
.method public abstract windowUpdate(IJ)V
.end method

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,540 @@
.class public final Lokhttp3/internal/http2/Http2Stream$FramingSink;
.super Ljava/lang/Object;
.source "SourceFile"
# interfaces
.implements Lokio/Sink;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lokhttp3/internal/http2/Http2Stream;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x11
name = "FramingSink"
.end annotation
# instance fields
.field public closed:Z
.field public finished:Z
.field public final sendBuffer:Lokio/Buffer;
.field public final synthetic this$0:Lokhttp3/internal/http2/Http2Stream;
.field public trailers:Lokhttp3/Headers;
# direct methods
.method static constructor <clinit>()V
.locals 0
return-void
.end method
.method public constructor <init>(Lokhttp3/internal/http2/Http2Stream;)V
.locals 0
iput-object p1, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 532
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 539
new-instance p1, Lokio/Buffer;
invoke-direct {p1}, Lokio/Buffer;-><init>()V
iput-object p1, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->sendBuffer:Lokio/Buffer;
return-void
.end method
# virtual methods
.method public close()V
.locals 8
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 606
monitor-enter v0
:try_start_0
iget-boolean v1, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->closed:Z
if-eqz v1, :cond_0
.line 607
monitor-exit v0
return-void
:catchall_0
move-exception v1
goto/16 :goto_4
.line 608
:cond_0
monitor-exit v0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 609
iget-object v0, v0, Lokhttp3/internal/http2/Http2Stream;->sink:Lokhttp3/internal/http2/Http2Stream$FramingSink;
iget-boolean v0, v0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->finished:Z
const/4 v1, 0x1
if-nez v0, :cond_5
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->sendBuffer:Lokio/Buffer;
.line 613
invoke-virtual {v0}, Lokio/Buffer;->size()J
move-result-wide v2
const-wide/16 v4, 0x0
cmp-long v0, v2, v4
const/4 v2, 0x0
if-lez v0, :cond_1
move v0, v1
goto :goto_0
:cond_1
move v0, v2
:goto_0
iget-object v3, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->trailers:Lokhttp3/Headers;
if-eqz v3, :cond_3
:goto_1
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->sendBuffer:Lokio/Buffer;
.line 616
invoke-virtual {v0}, Lokio/Buffer;->size()J
move-result-wide v6
cmp-long v0, v6, v4
if-lez v0, :cond_2
.line 617
invoke-virtual {p0, v2}, Lokhttp3/internal/http2/Http2Stream$FramingSink;->emitFrame(Z)V
goto :goto_1
:cond_2
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 619
iget-object v2, v0, Lokhttp3/internal/http2/Http2Stream;->connection:Lokhttp3/internal/http2/Http2Connection;
iget v0, v0, Lokhttp3/internal/http2/Http2Stream;->id:I
iget-object v3, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->trailers:Lokhttp3/Headers;
invoke-static {v3}, Lokhttp3/internal/Util;->toHeaderBlock(Lokhttp3/Headers;)Ljava/util/List;
move-result-object v3
invoke-virtual {v2, v0, v1, v3}, Lokhttp3/internal/http2/Http2Connection;->writeHeaders(IZLjava/util/List;)V
goto :goto_3
:cond_3
if-eqz v0, :cond_4
:goto_2
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->sendBuffer:Lokio/Buffer;
.line 621
invoke-virtual {v0}, Lokio/Buffer;->size()J
move-result-wide v2
cmp-long v0, v2, v4
if-lez v0, :cond_5
.line 622
invoke-virtual {p0, v1}, Lokhttp3/internal/http2/Http2Stream$FramingSink;->emitFrame(Z)V
goto :goto_2
:cond_4
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 625
iget-object v2, v0, Lokhttp3/internal/http2/Http2Stream;->connection:Lokhttp3/internal/http2/Http2Connection;
iget v3, v0, Lokhttp3/internal/http2/Http2Stream;->id:I
const/4 v4, 0x1
const/4 v5, 0x0
const-wide/16 v6, 0x0
invoke-virtual/range {v2 .. v7}, Lokhttp3/internal/http2/Http2Connection;->writeData(IZLokio/Buffer;J)V
:cond_5
:goto_3
iget-object v2, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 628
monitor-enter v2
:try_start_1
iput-boolean v1, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->closed:Z
.line 630
monitor-exit v2
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_1
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 631
iget-object v0, v0, Lokhttp3/internal/http2/Http2Stream;->connection:Lokhttp3/internal/http2/Http2Connection;
invoke-virtual {v0}, Lokhttp3/internal/http2/Http2Connection;->flush()V
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 632
invoke-virtual {v0}, Lokhttp3/internal/http2/Http2Stream;->cancelStreamIfNecessary()V
return-void
:catchall_1
move-exception v0
.line 630
:try_start_2
monitor-exit v2
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_1
throw v0
.line 608
:goto_4
:try_start_3
monitor-exit v0
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_0
throw v1
.end method
.method public final emitFrame(Z)V
.locals 11
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 565
monitor-enter v0
:try_start_0
iget-object v1, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 566
iget-object v1, v1, Lokhttp3/internal/http2/Http2Stream;->writeTimeout:Lokhttp3/internal/http2/Http2Stream$StreamTimeout;
invoke-virtual {v1}, Lokio/AsyncTimeout;->enter()V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_2
:goto_0
:try_start_1
iget-object v1, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 568
iget-wide v2, v1, Lokhttp3/internal/http2/Http2Stream;->bytesLeftInWriteWindow:J
const-wide/16 v4, 0x0
cmp-long v2, v2, v4
if-gtz v2, :cond_0
iget-boolean v2, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->finished:Z
if-nez v2, :cond_0
iget-boolean v2, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->closed:Z
if-nez v2, :cond_0
iget-object v2, v1, Lokhttp3/internal/http2/Http2Stream;->errorCode:Lokhttp3/internal/http2/ErrorCode;
if-nez v2, :cond_0
.line 569
invoke-virtual {v1}, Lokhttp3/internal/http2/Http2Stream;->waitForIo()V
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
goto :goto_0
:catchall_0
move-exception p1
goto :goto_4
.line 572
:cond_0
:try_start_2
iget-object v1, v1, Lokhttp3/internal/http2/Http2Stream;->writeTimeout:Lokhttp3/internal/http2/Http2Stream$StreamTimeout;
invoke-virtual {v1}, Lokhttp3/internal/http2/Http2Stream$StreamTimeout;->exitAndThrowIfTimedOut()V
iget-object v1, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 575
invoke-virtual {v1}, Lokhttp3/internal/http2/Http2Stream;->checkOutNotClosed()V
iget-object v1, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 576
iget-wide v1, v1, Lokhttp3/internal/http2/Http2Stream;->bytesLeftInWriteWindow:J
iget-object v3, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->sendBuffer:Lokio/Buffer;
invoke-virtual {v3}, Lokio/Buffer;->size()J
move-result-wide v3
invoke-static {v1, v2, v3, v4}, Ljava/lang/Math;->min(JJ)J
move-result-wide v9
iget-object v1, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 577
iget-wide v2, v1, Lokhttp3/internal/http2/Http2Stream;->bytesLeftInWriteWindow:J
sub-long/2addr v2, v9
iput-wide v2, v1, Lokhttp3/internal/http2/Http2Stream;->bytesLeftInWriteWindow:J
.line 578
monitor-exit v0
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_2
.line 580
iget-object v0, v1, Lokhttp3/internal/http2/Http2Stream;->writeTimeout:Lokhttp3/internal/http2/Http2Stream$StreamTimeout;
invoke-virtual {v0}, Lokio/AsyncTimeout;->enter()V
if-eqz p1, :cond_1
:try_start_3
iget-object p1, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->sendBuffer:Lokio/Buffer;
.line 582
invoke-virtual {p1}, Lokio/Buffer;->size()J
move-result-wide v0
cmp-long p1, v9, v0
if-nez p1, :cond_1
const/4 p1, 0x1
:goto_1
move v7, p1
goto :goto_2
:catchall_1
move-exception p1
goto :goto_3
:cond_1
const/4 p1, 0x0
goto :goto_1
:goto_2
iget-object p1, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 583
iget-object v5, p1, Lokhttp3/internal/http2/Http2Stream;->connection:Lokhttp3/internal/http2/Http2Connection;
iget v6, p1, Lokhttp3/internal/http2/Http2Stream;->id:I
iget-object v8, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->sendBuffer:Lokio/Buffer;
invoke-virtual/range {v5 .. v10}, Lokhttp3/internal/http2/Http2Connection;->writeData(IZLokio/Buffer;J)V
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_1
iget-object p1, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 585
iget-object p1, p1, Lokhttp3/internal/http2/Http2Stream;->writeTimeout:Lokhttp3/internal/http2/Http2Stream$StreamTimeout;
invoke-virtual {p1}, Lokhttp3/internal/http2/Http2Stream$StreamTimeout;->exitAndThrowIfTimedOut()V
return-void
:goto_3
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->this$0:Lokhttp3/internal/http2/Http2Stream;
iget-object v0, v0, Lokhttp3/internal/http2/Http2Stream;->writeTimeout:Lokhttp3/internal/http2/Http2Stream$StreamTimeout;
invoke-virtual {v0}, Lokhttp3/internal/http2/Http2Stream$StreamTimeout;->exitAndThrowIfTimedOut()V
throw p1
:catchall_2
move-exception p1
goto :goto_5
:goto_4
:try_start_4
iget-object v1, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 572
iget-object v1, v1, Lokhttp3/internal/http2/Http2Stream;->writeTimeout:Lokhttp3/internal/http2/Http2Stream$StreamTimeout;
invoke-virtual {v1}, Lokhttp3/internal/http2/Http2Stream$StreamTimeout;->exitAndThrowIfTimedOut()V
throw p1
.line 578
:goto_5
monitor-exit v0
:try_end_4
.catchall {:try_start_4 .. :try_end_4} :catchall_2
throw p1
.end method
.method public flush()V
.locals 4
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 591
monitor-enter v0
:try_start_0
iget-object v1, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 592
invoke-virtual {v1}, Lokhttp3/internal/http2/Http2Stream;->checkOutNotClosed()V
.line 593
monitor-exit v0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
:goto_0
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->sendBuffer:Lokio/Buffer;
.line 594
invoke-virtual {v0}, Lokio/Buffer;->size()J
move-result-wide v0
const-wide/16 v2, 0x0
cmp-long v0, v0, v2
if-lez v0, :cond_0
const/4 v0, 0x0
.line 595
invoke-virtual {p0, v0}, Lokhttp3/internal/http2/Http2Stream$FramingSink;->emitFrame(Z)V
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 596
iget-object v0, v0, Lokhttp3/internal/http2/Http2Stream;->connection:Lokhttp3/internal/http2/Http2Connection;
invoke-virtual {v0}, Lokhttp3/internal/http2/Http2Connection;->flush()V
goto :goto_0
:cond_0
return-void
:catchall_0
move-exception v1
.line 593
:try_start_1
monitor-exit v0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
throw v1
.end method
.method public timeout()Lokio/Timeout;
.locals 1
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 601
iget-object v0, v0, Lokhttp3/internal/http2/Http2Stream;->writeTimeout:Lokhttp3/internal/http2/Http2Stream$StreamTimeout;
return-object v0
.end method
.method public write(Lokio/Buffer;J)V
.locals 2
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->sendBuffer:Lokio/Buffer;
.line 553
invoke-virtual {v0, p1, p2, p3}, Lokio/Buffer;->write(Lokio/Buffer;J)V
:goto_0
iget-object p1, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->sendBuffer:Lokio/Buffer;
.line 554
invoke-virtual {p1}, Lokio/Buffer;->size()J
move-result-wide p1
const-wide/16 v0, 0x4000
cmp-long p1, p1, v0
if-ltz p1, :cond_0
const/4 p1, 0x0
.line 555
invoke-virtual {p0, p1}, Lokhttp3/internal/http2/Http2Stream$FramingSink;->emitFrame(Z)V
goto :goto_0
:cond_0
return-void
.end method

View File

@@ -0,0 +1,624 @@
.class public final Lokhttp3/internal/http2/Http2Stream$FramingSource;
.super Ljava/lang/Object;
.source "SourceFile"
# interfaces
.implements Lokio/Source;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lokhttp3/internal/http2/Http2Stream;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x11
name = "FramingSource"
.end annotation
# instance fields
.field public closed:Z
.field public finished:Z
.field public final maxByteCount:J
.field public final readBuffer:Lokio/Buffer;
.field public final receiveBuffer:Lokio/Buffer;
.field public final synthetic this$0:Lokhttp3/internal/http2/Http2Stream;
.field public trailers:Lokhttp3/Headers;
# direct methods
.method static constructor <clinit>()V
.locals 0
return-void
.end method
.method public constructor <init>(Lokhttp3/internal/http2/Http2Stream;J)V
.locals 0
iput-object p1, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 364
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 341
new-instance p1, Lokio/Buffer;
invoke-direct {p1}, Lokio/Buffer;-><init>()V
iput-object p1, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->receiveBuffer:Lokio/Buffer;
.line 344
new-instance p1, Lokio/Buffer;
invoke-direct {p1}, Lokio/Buffer;-><init>()V
iput-object p1, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->readBuffer:Lokio/Buffer;
iput-wide p2, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->maxByteCount:J
return-void
.end method
.method public static synthetic access$202(Lokhttp3/internal/http2/Http2Stream$FramingSource;Lokhttp3/Headers;)Lokhttp3/Headers;
.locals 0
.line 339
iput-object p1, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->trailers:Lokhttp3/Headers;
return-object p1
.end method
# virtual methods
.method public close()V
.locals 5
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 499
monitor-enter v0
const/4 v1, 0x1
:try_start_0
iput-boolean v1, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->closed:Z
iget-object v1, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->readBuffer:Lokio/Buffer;
.line 501
invoke-virtual {v1}, Lokio/Buffer;->size()J
move-result-wide v1
iget-object v3, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->readBuffer:Lokio/Buffer;
.line 502
invoke-virtual {v3}, Lokio/Buffer;->clear()V
iget-object v3, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 503
invoke-virtual {v3}, Ljava/lang/Object;->notifyAll()V
.line 504
monitor-exit v0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
const-wide/16 v3, 0x0
cmp-long v0, v1, v3
if-lez v0, :cond_0
.line 506
invoke-virtual {p0, v1, v2}, Lokhttp3/internal/http2/Http2Stream$FramingSource;->updateConnectionFlowControl(J)V
:cond_0
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 508
invoke-virtual {v0}, Lokhttp3/internal/http2/Http2Stream;->cancelStreamIfNecessary()V
return-void
:catchall_0
move-exception v1
.line 504
:try_start_1
monitor-exit v0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
throw v1
.end method
.method public read(Lokio/Buffer;J)J
.locals 11
const-wide/16 v0, 0x0
cmp-long v2, p2, v0
if-ltz v2, :cond_8
:goto_0
iget-object v2, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 377
monitor-enter v2
:try_start_0
iget-object v3, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 378
iget-object v3, v3, Lokhttp3/internal/http2/Http2Stream;->readTimeout:Lokhttp3/internal/http2/Http2Stream$StreamTimeout;
invoke-virtual {v3}, Lokio/AsyncTimeout;->enter()V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_1
:try_start_1
iget-object v3, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 380
iget-object v4, v3, Lokhttp3/internal/http2/Http2Stream;->errorCode:Lokhttp3/internal/http2/ErrorCode;
if-eqz v4, :cond_1
.line 382
iget-object v3, v3, Lokhttp3/internal/http2/Http2Stream;->errorException:Ljava/io/IOException;
if-eqz v3, :cond_0
goto :goto_1
.line 384
:cond_0
new-instance v3, Lokhttp3/internal/http2/StreamResetException;
iget-object v4, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->this$0:Lokhttp3/internal/http2/Http2Stream;
iget-object v4, v4, Lokhttp3/internal/http2/Http2Stream;->errorCode:Lokhttp3/internal/http2/ErrorCode;
invoke-direct {v3, v4}, Lokhttp3/internal/http2/StreamResetException;-><init>(Lokhttp3/internal/http2/ErrorCode;)V
goto :goto_1
:catchall_0
move-exception p1
goto/16 :goto_3
:cond_1
const/4 v3, 0x0
:goto_1
iget-boolean v4, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->closed:Z
if-nez v4, :cond_7
iget-object v4, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->readBuffer:Lokio/Buffer;
.line 390
invoke-virtual {v4}, Lokio/Buffer;->size()J
move-result-wide v4
cmp-long v4, v4, v0
const-wide/16 v5, -0x1
if-lez v4, :cond_2
iget-object v4, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->readBuffer:Lokio/Buffer;
.line 392
invoke-virtual {v4}, Lokio/Buffer;->size()J
move-result-wide v7
invoke-static {p2, p3, v7, v8}, Ljava/lang/Math;->min(JJ)J
move-result-wide p2
invoke-virtual {v4, p1, p2, p3}, Lokio/Buffer;->read(Lokio/Buffer;J)J
move-result-wide p1
iget-object p3, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 393
iget-wide v7, p3, Lokhttp3/internal/http2/Http2Stream;->unacknowledgedBytesRead:J
add-long/2addr v7, p1
iput-wide v7, p3, Lokhttp3/internal/http2/Http2Stream;->unacknowledgedBytesRead:J
if-nez v3, :cond_4
.line 395
iget-object p3, p3, Lokhttp3/internal/http2/Http2Stream;->connection:Lokhttp3/internal/http2/Http2Connection;
iget-object p3, p3, Lokhttp3/internal/http2/Http2Connection;->okHttpSettings:Lokhttp3/internal/http2/Settings;
.line 397
invoke-virtual {p3}, Lokhttp3/internal/http2/Settings;->getInitialWindowSize()I
move-result p3
div-int/lit8 p3, p3, 0x2
int-to-long v9, p3
cmp-long p3, v7, v9
if-ltz p3, :cond_4
iget-object p3, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 400
iget-object v4, p3, Lokhttp3/internal/http2/Http2Stream;->connection:Lokhttp3/internal/http2/Http2Connection;
iget v7, p3, Lokhttp3/internal/http2/Http2Stream;->id:I
iget-wide v8, p3, Lokhttp3/internal/http2/Http2Stream;->unacknowledgedBytesRead:J
invoke-virtual {v4, v7, v8, v9}, Lokhttp3/internal/http2/Http2Connection;->writeWindowUpdateLater(IJ)V
iget-object p3, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 401
iput-wide v0, p3, Lokhttp3/internal/http2/Http2Stream;->unacknowledgedBytesRead:J
goto :goto_2
:cond_2
iget-boolean v4, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->finished:Z
if-nez v4, :cond_3
if-nez v3, :cond_3
iget-object v3, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 405
invoke-virtual {v3}, Lokhttp3/internal/http2/Http2Stream;->waitForIo()V
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
:try_start_2
iget-object v3, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 409
iget-object v3, v3, Lokhttp3/internal/http2/Http2Stream;->readTimeout:Lokhttp3/internal/http2/Http2Stream$StreamTimeout;
invoke-virtual {v3}, Lokhttp3/internal/http2/Http2Stream$StreamTimeout;->exitAndThrowIfTimedOut()V
monitor-exit v2
goto :goto_0
:catchall_1
move-exception p1
goto :goto_4
:cond_3
move-wide p1, v5
:cond_4
:goto_2
iget-object p3, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->this$0:Lokhttp3/internal/http2/Http2Stream;
iget-object p3, p3, Lokhttp3/internal/http2/Http2Stream;->readTimeout:Lokhttp3/internal/http2/Http2Stream$StreamTimeout;
invoke-virtual {p3}, Lokhttp3/internal/http2/Http2Stream$StreamTimeout;->exitAndThrowIfTimedOut()V
.line 411
monitor-exit v2
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_1
cmp-long p3, p1, v5
if-eqz p3, :cond_5
.line 417
invoke-virtual {p0, p1, p2}, Lokhttp3/internal/http2/Http2Stream$FramingSource;->updateConnectionFlowControl(J)V
return-wide p1
:cond_5
if-nez v3, :cond_6
return-wide v5
.line 426
:cond_6
throw v3
.line 388
:cond_7
:try_start_3
new-instance p1, Ljava/io/IOException;
const-string p2, "stream closed"
invoke-direct {p1, p2}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
throw p1
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_0
:goto_3
:try_start_4
iget-object p2, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 409
iget-object p2, p2, Lokhttp3/internal/http2/Http2Stream;->readTimeout:Lokhttp3/internal/http2/Http2Stream$StreamTimeout;
invoke-virtual {p2}, Lokhttp3/internal/http2/Http2Stream$StreamTimeout;->exitAndThrowIfTimedOut()V
throw p1
.line 411
:goto_4
monitor-exit v2
:try_end_4
.catchall {:try_start_4 .. :try_end_4} :catchall_1
throw p1
.line 369
:cond_8
new-instance p1, Ljava/lang/IllegalArgumentException;
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const-string v1, "byteCount < 0: "
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0, p2, p3}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p2
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public receive(Lokio/BufferedSource;J)V
.locals 9
:cond_0
:goto_0
const-wide/16 v0, 0x0
cmp-long v2, p2, v0
if-lez v2, :cond_8
iget-object v2, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 448
monitor-enter v2
:try_start_0
iget-boolean v3, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->finished:Z
iget-object v4, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->readBuffer:Lokio/Buffer;
.line 450
invoke-virtual {v4}, Lokio/Buffer;->size()J
move-result-wide v4
add-long/2addr v4, p2
iget-wide v6, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->maxByteCount:J
cmp-long v4, v4, v6
const/4 v5, 0x0
const/4 v6, 0x1
if-lez v4, :cond_1
move v4, v6
goto :goto_1
:cond_1
move v4, v5
.line 451
:goto_1
monitor-exit v2
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_1
if-eqz v4, :cond_2
.line 455
invoke-interface {p1, p2, p3}, Lokio/BufferedSource;->skip(J)V
iget-object p1, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 456
sget-object p2, Lokhttp3/internal/http2/ErrorCode;->FLOW_CONTROL_ERROR:Lokhttp3/internal/http2/ErrorCode;
invoke-virtual {p1, p2}, Lokhttp3/internal/http2/Http2Stream;->closeLater(Lokhttp3/internal/http2/ErrorCode;)V
return-void
:cond_2
if-eqz v3, :cond_3
.line 462
invoke-interface {p1, p2, p3}, Lokio/BufferedSource;->skip(J)V
return-void
:cond_3
iget-object v2, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->receiveBuffer:Lokio/Buffer;
.line 467
invoke-interface {p1, v2, p2, p3}, Lokio/Source;->read(Lokio/Buffer;J)J
move-result-wide v2
const-wide/16 v7, -0x1
cmp-long v4, v2, v7
if-eqz v4, :cond_7
sub-long/2addr p2, v2
iget-object v2, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 475
monitor-enter v2
:try_start_1
iget-boolean v3, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->closed:Z
if-eqz v3, :cond_4
iget-object v3, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->receiveBuffer:Lokio/Buffer;
.line 477
invoke-virtual {v3}, Lokio/Buffer;->size()J
move-result-wide v3
iget-object v5, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->receiveBuffer:Lokio/Buffer;
.line 478
invoke-virtual {v5}, Lokio/Buffer;->clear()V
goto :goto_2
:catchall_0
move-exception p1
goto :goto_3
:cond_4
iget-object v3, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->readBuffer:Lokio/Buffer;
.line 480
invoke-virtual {v3}, Lokio/Buffer;->size()J
move-result-wide v3
cmp-long v3, v3, v0
if-nez v3, :cond_5
move v5, v6
:cond_5
iget-object v3, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->readBuffer:Lokio/Buffer;
iget-object v4, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->receiveBuffer:Lokio/Buffer;
.line 481
invoke-virtual {v3, v4}, Lokio/Buffer;->writeAll(Lokio/Source;)J
if-eqz v5, :cond_6
iget-object v3, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 483
invoke-virtual {v3}, Ljava/lang/Object;->notifyAll()V
:cond_6
move-wide v3, v0
.line 486
:goto_2
monitor-exit v2
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
cmp-long v0, v3, v0
if-lez v0, :cond_0
.line 488
invoke-virtual {p0, v3, v4}, Lokhttp3/internal/http2/Http2Stream$FramingSource;->updateConnectionFlowControl(J)V
goto :goto_0
.line 486
:goto_3
:try_start_2
monitor-exit v2
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
throw p1
.line 468
:cond_7
new-instance p1, Ljava/io/EOFException;
invoke-direct {p1}, Ljava/io/EOFException;-><init>()V
throw p1
:catchall_1
move-exception p1
.line 451
:try_start_3
monitor-exit v2
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_1
throw p1
:cond_8
return-void
.end method
.method public timeout()Lokio/Timeout;
.locals 1
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 494
iget-object v0, v0, Lokhttp3/internal/http2/Http2Stream;->readTimeout:Lokhttp3/internal/http2/Http2Stream$StreamTimeout;
return-object v0
.end method
.method public final updateConnectionFlowControl(J)V
.locals 1
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 435
iget-object v0, v0, Lokhttp3/internal/http2/Http2Stream;->connection:Lokhttp3/internal/http2/Http2Connection;
invoke-virtual {v0, p1, p2}, Lokhttp3/internal/http2/Http2Connection;->updateConnectionFlowControl(J)V
return-void
.end method

View File

@@ -0,0 +1,94 @@
.class public Lokhttp3/internal/http2/Http2Stream$StreamTimeout;
.super Lokio/AsyncTimeout;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lokhttp3/internal/http2/Http2Stream;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1
name = "StreamTimeout"
.end annotation
# instance fields
.field public final synthetic this$0:Lokhttp3/internal/http2/Http2Stream;
# direct methods
.method public constructor <init>(Lokhttp3/internal/http2/Http2Stream;)V
.locals 0
iput-object p1, p0, Lokhttp3/internal/http2/Http2Stream$StreamTimeout;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 671
invoke-direct {p0}, Lokio/AsyncTimeout;-><init>()V
return-void
.end method
# virtual methods
.method public exitAndThrowIfTimedOut()V
.locals 1
.line 686
invoke-virtual {p0}, Lokio/AsyncTimeout;->exit()Z
move-result v0
if-nez v0, :cond_0
return-void
:cond_0
const/4 v0, 0x0
invoke-virtual {p0, v0}, Lokhttp3/internal/http2/Http2Stream$StreamTimeout;->newTimeoutException(Ljava/io/IOException;)Ljava/io/IOException;
move-result-object v0
throw v0
.end method
.method public newTimeoutException(Ljava/io/IOException;)Ljava/io/IOException;
.locals 2
.line 678
new-instance v0, Ljava/net/SocketTimeoutException;
const-string v1, "timeout"
invoke-direct {v0, v1}, Ljava/net/SocketTimeoutException;-><init>(Ljava/lang/String;)V
if-eqz p1, :cond_0
.line 680
invoke-virtual {v0, p1}, Ljava/lang/Throwable;->initCause(Ljava/lang/Throwable;)Ljava/lang/Throwable;
:cond_0
return-object v0
.end method
.method public timedOut()V
.locals 2
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream$StreamTimeout;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 673
sget-object v1, Lokhttp3/internal/http2/ErrorCode;->CANCEL:Lokhttp3/internal/http2/ErrorCode;
invoke-virtual {v0, v1}, Lokhttp3/internal/http2/Http2Stream;->closeLater(Lokhttp3/internal/http2/ErrorCode;)V
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream$StreamTimeout;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 674
iget-object v0, v0, Lokhttp3/internal/http2/Http2Stream;->connection:Lokhttp3/internal/http2/Http2Connection;
invoke-virtual {v0}, Lokhttp3/internal/http2/Http2Connection;->sendDegradedPingLater()V
return-void
.end method

View File

@@ -0,0 +1,957 @@
.class public final Lokhttp3/internal/http2/Http2Stream;
.super Ljava/lang/Object;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lokhttp3/internal/http2/Http2Stream$StreamTimeout;,
Lokhttp3/internal/http2/Http2Stream$FramingSink;,
Lokhttp3/internal/http2/Http2Stream$FramingSource;
}
.end annotation
# instance fields
.field public bytesLeftInWriteWindow:J
.field public final connection:Lokhttp3/internal/http2/Http2Connection;
.field public errorCode:Lokhttp3/internal/http2/ErrorCode;
.field public errorException:Ljava/io/IOException;
.field public hasResponseHeaders:Z
.field public final headersQueue:Ljava/util/Deque;
.field public final id:I
.field public final readTimeout:Lokhttp3/internal/http2/Http2Stream$StreamTimeout;
.field public final sink:Lokhttp3/internal/http2/Http2Stream$FramingSink;
.field public final source:Lokhttp3/internal/http2/Http2Stream$FramingSource;
.field public unacknowledgedBytesRead:J
.field public final writeTimeout:Lokhttp3/internal/http2/Http2Stream$StreamTimeout;
# direct methods
.method static constructor <clinit>()V
.locals 0
return-void
.end method
.method public constructor <init>(ILokhttp3/internal/http2/Http2Connection;ZZLokhttp3/Headers;)V
.locals 3
.line 83
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
const-wide/16 v0, 0x0
iput-wide v0, p0, Lokhttp3/internal/http2/Http2Stream;->unacknowledgedBytesRead:J
.line 62
new-instance v0, Ljava/util/ArrayDeque;
invoke-direct {v0}, Ljava/util/ArrayDeque;-><init>()V
iput-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->headersQueue:Ljava/util/Deque;
.line 69
new-instance v1, Lokhttp3/internal/http2/Http2Stream$StreamTimeout;
invoke-direct {v1, p0}, Lokhttp3/internal/http2/Http2Stream$StreamTimeout;-><init>(Lokhttp3/internal/http2/Http2Stream;)V
iput-object v1, p0, Lokhttp3/internal/http2/Http2Stream;->readTimeout:Lokhttp3/internal/http2/Http2Stream$StreamTimeout;
.line 70
new-instance v1, Lokhttp3/internal/http2/Http2Stream$StreamTimeout;
invoke-direct {v1, p0}, Lokhttp3/internal/http2/Http2Stream$StreamTimeout;-><init>(Lokhttp3/internal/http2/Http2Stream;)V
iput-object v1, p0, Lokhttp3/internal/http2/Http2Stream;->writeTimeout:Lokhttp3/internal/http2/Http2Stream$StreamTimeout;
if-eqz p2, :cond_5
iput p1, p0, Lokhttp3/internal/http2/Http2Stream;->id:I
iput-object p2, p0, Lokhttp3/internal/http2/Http2Stream;->connection:Lokhttp3/internal/http2/Http2Connection;
.line 88
iget-object p1, p2, Lokhttp3/internal/http2/Http2Connection;->peerSettings:Lokhttp3/internal/http2/Settings;
.line 89
invoke-virtual {p1}, Lokhttp3/internal/http2/Settings;->getInitialWindowSize()I
move-result p1
int-to-long v1, p1
iput-wide v1, p0, Lokhttp3/internal/http2/Http2Stream;->bytesLeftInWriteWindow:J
.line 90
new-instance p1, Lokhttp3/internal/http2/Http2Stream$FramingSource;
iget-object p2, p2, Lokhttp3/internal/http2/Http2Connection;->okHttpSettings:Lokhttp3/internal/http2/Settings;
invoke-virtual {p2}, Lokhttp3/internal/http2/Settings;->getInitialWindowSize()I
move-result p2
int-to-long v1, p2
invoke-direct {p1, p0, v1, v2}, Lokhttp3/internal/http2/Http2Stream$FramingSource;-><init>(Lokhttp3/internal/http2/Http2Stream;J)V
iput-object p1, p0, Lokhttp3/internal/http2/Http2Stream;->source:Lokhttp3/internal/http2/Http2Stream$FramingSource;
.line 91
new-instance p2, Lokhttp3/internal/http2/Http2Stream$FramingSink;
invoke-direct {p2, p0}, Lokhttp3/internal/http2/Http2Stream$FramingSink;-><init>(Lokhttp3/internal/http2/Http2Stream;)V
iput-object p2, p0, Lokhttp3/internal/http2/Http2Stream;->sink:Lokhttp3/internal/http2/Http2Stream$FramingSink;
iput-boolean p4, p1, Lokhttp3/internal/http2/Http2Stream$FramingSource;->finished:Z
iput-boolean p3, p2, Lokhttp3/internal/http2/Http2Stream$FramingSink;->finished:Z
if-eqz p5, :cond_0
.line 95
invoke-interface {v0, p5}, Ljava/util/Deque;->add(Ljava/lang/Object;)Z
.line 98
:cond_0
invoke-virtual {p0}, Lokhttp3/internal/http2/Http2Stream;->isLocallyInitiated()Z
move-result p1
if-eqz p1, :cond_2
if-nez p5, :cond_1
goto :goto_0
.line 99
:cond_1
new-instance p1, Ljava/lang/IllegalStateException;
const-string p2, "locally-initiated streams shouldn\'t have headers yet"
invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p1
.line 100
:cond_2
:goto_0
invoke-virtual {p0}, Lokhttp3/internal/http2/Http2Stream;->isLocallyInitiated()Z
move-result p1
if-nez p1, :cond_4
if-eqz p5, :cond_3
goto :goto_1
.line 101
:cond_3
new-instance p1, Ljava/lang/IllegalStateException;
const-string p2, "remotely-initiated streams should have headers"
invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p1
:cond_4
:goto_1
return-void
.line 84
:cond_5
new-instance p1, Ljava/lang/NullPointerException;
const-string p2, "connection == null"
invoke-direct {p1, p2}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
throw p1
.end method
# virtual methods
.method public addBytesToWriteWindow(J)V
.locals 2
iget-wide v0, p0, Lokhttp3/internal/http2/Http2Stream;->bytesLeftInWriteWindow:J
add-long/2addr v0, p1
iput-wide v0, p0, Lokhttp3/internal/http2/Http2Stream;->bytesLeftInWriteWindow:J
const-wide/16 v0, 0x0
cmp-long p1, p1, v0
if-lez p1, :cond_0
.line 641
invoke-virtual {p0}, Ljava/lang/Object;->notifyAll()V
:cond_0
return-void
.end method
.method public cancelStreamIfNecessary()V
.locals 2
.line 516
monitor-enter p0
:try_start_0
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->source:Lokhttp3/internal/http2/Http2Stream$FramingSource;
.line 517
iget-boolean v1, v0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->finished:Z
if-nez v1, :cond_1
iget-boolean v0, v0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->closed:Z
if-eqz v0, :cond_1
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->sink:Lokhttp3/internal/http2/Http2Stream$FramingSink;
iget-boolean v1, v0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->finished:Z
if-nez v1, :cond_0
iget-boolean v0, v0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->closed:Z
if-eqz v0, :cond_1
goto :goto_0
:catchall_0
move-exception v0
goto :goto_3
:cond_0
:goto_0
const/4 v0, 0x1
goto :goto_1
:cond_1
const/4 v0, 0x0
.line 518
:goto_1
invoke-virtual {p0}, Lokhttp3/internal/http2/Http2Stream;->isOpen()Z
move-result v1
.line 519
monitor-exit p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
if-eqz v0, :cond_2
.line 525
sget-object v0, Lokhttp3/internal/http2/ErrorCode;->CANCEL:Lokhttp3/internal/http2/ErrorCode;
const/4 v1, 0x0
invoke-virtual {p0, v0, v1}, Lokhttp3/internal/http2/Http2Stream;->close(Lokhttp3/internal/http2/ErrorCode;Ljava/io/IOException;)V
goto :goto_2
:cond_2
if-nez v1, :cond_3
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->connection:Lokhttp3/internal/http2/Http2Connection;
iget v1, p0, Lokhttp3/internal/http2/Http2Stream;->id:I
.line 527
invoke-virtual {v0, v1}, Lokhttp3/internal/http2/Http2Connection;->removeStream(I)Lokhttp3/internal/http2/Http2Stream;
:cond_3
:goto_2
return-void
.line 519
:goto_3
:try_start_1
monitor-exit p0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
throw v0
.end method
.method public checkOutNotClosed()V
.locals 2
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->sink:Lokhttp3/internal/http2/Http2Stream$FramingSink;
.line 645
iget-boolean v1, v0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->closed:Z
if-nez v1, :cond_3
.line 647
iget-boolean v0, v0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->finished:Z
if-nez v0, :cond_2
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->errorCode:Lokhttp3/internal/http2/ErrorCode;
if-eqz v0, :cond_1
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->errorException:Ljava/io/IOException;
if-eqz v0, :cond_0
goto :goto_0
.line 650
:cond_0
new-instance v0, Lokhttp3/internal/http2/StreamResetException;
iget-object v1, p0, Lokhttp3/internal/http2/Http2Stream;->errorCode:Lokhttp3/internal/http2/ErrorCode;
invoke-direct {v0, v1}, Lokhttp3/internal/http2/StreamResetException;-><init>(Lokhttp3/internal/http2/ErrorCode;)V
:goto_0
throw v0
:cond_1
return-void
.line 648
:cond_2
new-instance v0, Ljava/io/IOException;
const-string v1, "stream finished"
invoke-direct {v0, v1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
throw v0
.line 646
:cond_3
new-instance v0, Ljava/io/IOException;
const-string v1, "stream closed"
invoke-direct {v0, v1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
throw v0
.end method
.method public close(Lokhttp3/internal/http2/ErrorCode;Ljava/io/IOException;)V
.locals 1
.line 262
invoke-virtual {p0, p1, p2}, Lokhttp3/internal/http2/Http2Stream;->closeInternal(Lokhttp3/internal/http2/ErrorCode;Ljava/io/IOException;)Z
move-result p2
if-nez p2, :cond_0
return-void
:cond_0
iget-object p2, p0, Lokhttp3/internal/http2/Http2Stream;->connection:Lokhttp3/internal/http2/Http2Connection;
iget v0, p0, Lokhttp3/internal/http2/Http2Stream;->id:I
.line 265
invoke-virtual {p2, v0, p1}, Lokhttp3/internal/http2/Http2Connection;->writeSynReset(ILokhttp3/internal/http2/ErrorCode;)V
return-void
.end method
.method public final closeInternal(Lokhttp3/internal/http2/ErrorCode;Ljava/io/IOException;)Z
.locals 2
.line 282
monitor-enter p0
:try_start_0
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->errorCode:Lokhttp3/internal/http2/ErrorCode;
const/4 v1, 0x0
if-eqz v0, :cond_0
.line 284
monitor-exit p0
return v1
:catchall_0
move-exception p1
goto :goto_0
:cond_0
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->source:Lokhttp3/internal/http2/Http2Stream$FramingSource;
.line 286
iget-boolean v0, v0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->finished:Z
if-eqz v0, :cond_1
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->sink:Lokhttp3/internal/http2/Http2Stream$FramingSink;
iget-boolean v0, v0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->finished:Z
if-eqz v0, :cond_1
.line 287
monitor-exit p0
return v1
:cond_1
iput-object p1, p0, Lokhttp3/internal/http2/Http2Stream;->errorCode:Lokhttp3/internal/http2/ErrorCode;
iput-object p2, p0, Lokhttp3/internal/http2/Http2Stream;->errorException:Ljava/io/IOException;
.line 291
invoke-virtual {p0}, Ljava/lang/Object;->notifyAll()V
.line 292
monitor-exit p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
iget-object p1, p0, Lokhttp3/internal/http2/Http2Stream;->connection:Lokhttp3/internal/http2/Http2Connection;
iget p2, p0, Lokhttp3/internal/http2/Http2Stream;->id:I
.line 293
invoke-virtual {p1, p2}, Lokhttp3/internal/http2/Http2Connection;->removeStream(I)Lokhttp3/internal/http2/Http2Stream;
const/4 p1, 0x1
return p1
.line 292
:goto_0
:try_start_1
monitor-exit p0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
throw p1
.end method
.method public closeLater(Lokhttp3/internal/http2/ErrorCode;)V
.locals 2
const/4 v0, 0x0
.line 273
invoke-virtual {p0, p1, v0}, Lokhttp3/internal/http2/Http2Stream;->closeInternal(Lokhttp3/internal/http2/ErrorCode;Ljava/io/IOException;)Z
move-result v0
if-nez v0, :cond_0
return-void
:cond_0
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->connection:Lokhttp3/internal/http2/Http2Connection;
iget v1, p0, Lokhttp3/internal/http2/Http2Stream;->id:I
.line 276
invoke-virtual {v0, v1, p1}, Lokhttp3/internal/http2/Http2Connection;->writeSynResetLater(ILokhttp3/internal/http2/ErrorCode;)V
return-void
.end method
.method public getId()I
.locals 1
iget v0, p0, Lokhttp3/internal/http2/Http2Stream;->id:I
return v0
.end method
.method public getSink()Lokio/Sink;
.locals 2
.line 248
monitor-enter p0
:try_start_0
iget-boolean v0, p0, Lokhttp3/internal/http2/Http2Stream;->hasResponseHeaders:Z
if-nez v0, :cond_1
.line 249
invoke-virtual {p0}, Lokhttp3/internal/http2/Http2Stream;->isLocallyInitiated()Z
move-result v0
if-eqz v0, :cond_0
goto :goto_0
.line 250
:cond_0
new-instance v0, Ljava/lang/IllegalStateException;
const-string v1, "reply before requesting the sink"
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v0
:catchall_0
move-exception v0
goto :goto_1
.line 252
:cond_1
:goto_0
monitor-exit p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->sink:Lokhttp3/internal/http2/Http2Stream$FramingSink;
return-object v0
:goto_1
:try_start_1
monitor-exit p0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
throw v0
.end method
.method public getSource()Lokio/Source;
.locals 1
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->source:Lokhttp3/internal/http2/Http2Stream$FramingSource;
return-object v0
.end method
.method public isLocallyInitiated()Z
.locals 4
iget v0, p0, Lokhttp3/internal/http2/Http2Stream;->id:I
const/4 v1, 0x1
and-int/2addr v0, v1
const/4 v2, 0x0
if-ne v0, v1, :cond_0
move v0, v1
goto :goto_0
:cond_0
move v0, v2
:goto_0
iget-object v3, p0, Lokhttp3/internal/http2/Http2Stream;->connection:Lokhttp3/internal/http2/Http2Connection;
.line 135
iget-boolean v3, v3, Lokhttp3/internal/http2/Http2Connection;->client:Z
if-ne v3, v0, :cond_1
goto :goto_1
:cond_1
move v1, v2
:goto_1
return v1
.end method
.method public declared-synchronized isOpen()Z
.locals 3
monitor-enter p0
:try_start_0
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->errorCode:Lokhttp3/internal/http2/ErrorCode;
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
const/4 v1, 0x0
if-eqz v0, :cond_0
.line 122
monitor-exit p0
return v1
:cond_0
:try_start_1
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->source:Lokhttp3/internal/http2/Http2Stream$FramingSource;
.line 124
iget-boolean v2, v0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->finished:Z
if-nez v2, :cond_1
iget-boolean v0, v0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->closed:Z
if-eqz v0, :cond_3
goto :goto_0
:catchall_0
move-exception v0
goto :goto_1
:cond_1
:goto_0
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->sink:Lokhttp3/internal/http2/Http2Stream$FramingSink;
iget-boolean v2, v0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->finished:Z
if-nez v2, :cond_2
iget-boolean v0, v0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->closed:Z
if-eqz v0, :cond_3
:cond_2
iget-boolean v0, p0, Lokhttp3/internal/http2/Http2Stream;->hasResponseHeaders:Z
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
if-eqz v0, :cond_3
.line 127
monitor-exit p0
return v1
.line 129
:cond_3
monitor-exit p0
const/4 v0, 0x1
return v0
:goto_1
monitor-exit p0
throw v0
.end method
.method public readTimeout()Lokio/Timeout;
.locals 1
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->readTimeout:Lokhttp3/internal/http2/Http2Stream$StreamTimeout;
return-object v0
.end method
.method public receiveData(Lokio/BufferedSource;I)V
.locals 3
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->source:Lokhttp3/internal/http2/Http2Stream$FramingSource;
int-to-long v1, p2
.line 299
invoke-virtual {v0, p1, v1, v2}, Lokhttp3/internal/http2/Http2Stream$FramingSource;->receive(Lokio/BufferedSource;J)V
return-void
.end method
.method public receiveHeaders(Lokhttp3/Headers;Z)V
.locals 2
.line 309
monitor-enter p0
:try_start_0
iget-boolean v0, p0, Lokhttp3/internal/http2/Http2Stream;->hasResponseHeaders:Z
const/4 v1, 0x1
if-eqz v0, :cond_1
if-nez p2, :cond_0
goto :goto_0
:cond_0
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->source:Lokhttp3/internal/http2/Http2Stream$FramingSource;
.line 314
invoke-static {v0, p1}, Lokhttp3/internal/http2/Http2Stream$FramingSource;->access$202(Lokhttp3/internal/http2/Http2Stream$FramingSource;Lokhttp3/Headers;)Lokhttp3/Headers;
goto :goto_1
:catchall_0
move-exception p1
goto :goto_2
:cond_1
:goto_0
iput-boolean v1, p0, Lokhttp3/internal/http2/Http2Stream;->hasResponseHeaders:Z
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->headersQueue:Ljava/util/Deque;
.line 312
invoke-interface {v0, p1}, Ljava/util/Deque;->add(Ljava/lang/Object;)Z
:goto_1
if-eqz p2, :cond_2
iget-object p1, p0, Lokhttp3/internal/http2/Http2Stream;->source:Lokhttp3/internal/http2/Http2Stream$FramingSource;
.line 317
iput-boolean v1, p1, Lokhttp3/internal/http2/Http2Stream$FramingSource;->finished:Z
.line 319
:cond_2
invoke-virtual {p0}, Lokhttp3/internal/http2/Http2Stream;->isOpen()Z
move-result p1
.line 320
invoke-virtual {p0}, Ljava/lang/Object;->notifyAll()V
.line 321
monitor-exit p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
if-nez p1, :cond_3
iget-object p1, p0, Lokhttp3/internal/http2/Http2Stream;->connection:Lokhttp3/internal/http2/Http2Connection;
iget p2, p0, Lokhttp3/internal/http2/Http2Stream;->id:I
.line 323
invoke-virtual {p1, p2}, Lokhttp3/internal/http2/Http2Connection;->removeStream(I)Lokhttp3/internal/http2/Http2Stream;
:cond_3
return-void
.line 321
:goto_2
:try_start_1
monitor-exit p0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
throw p1
.end method
.method public declared-synchronized receiveRstStream(Lokhttp3/internal/http2/ErrorCode;)V
.locals 1
monitor-enter p0
:try_start_0
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->errorCode:Lokhttp3/internal/http2/ErrorCode;
if-nez v0, :cond_0
iput-object p1, p0, Lokhttp3/internal/http2/Http2Stream;->errorCode:Lokhttp3/internal/http2/ErrorCode;
.line 330
invoke-virtual {p0}, Ljava/lang/Object;->notifyAll()V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
goto :goto_0
:catchall_0
move-exception p1
goto :goto_1
.line 332
:cond_0
:goto_0
monitor-exit p0
return-void
:goto_1
monitor-exit p0
throw p1
.end method
.method public declared-synchronized takeHeaders()Lokhttp3/Headers;
.locals 2
monitor-enter p0
:try_start_0
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->readTimeout:Lokhttp3/internal/http2/Http2Stream$StreamTimeout;
.line 148
invoke-virtual {v0}, Lokio/AsyncTimeout;->enter()V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_1
:goto_0
:try_start_1
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->headersQueue:Ljava/util/Deque;
.line 150
invoke-interface {v0}, Ljava/util/Collection;->isEmpty()Z
move-result v0
if-eqz v0, :cond_0
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->errorCode:Lokhttp3/internal/http2/ErrorCode;
if-nez v0, :cond_0
.line 151
invoke-virtual {p0}, Lokhttp3/internal/http2/Http2Stream;->waitForIo()V
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
goto :goto_0
:catchall_0
move-exception v0
goto :goto_2
:cond_0
:try_start_2
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->readTimeout:Lokhttp3/internal/http2/Http2Stream$StreamTimeout;
.line 154
invoke-virtual {v0}, Lokhttp3/internal/http2/Http2Stream$StreamTimeout;->exitAndThrowIfTimedOut()V
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->headersQueue:Ljava/util/Deque;
.line 156
invoke-interface {v0}, Ljava/util/Collection;->isEmpty()Z
move-result v0
if-nez v0, :cond_1
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->headersQueue:Ljava/util/Deque;
.line 157
invoke-interface {v0}, Ljava/util/Deque;->removeFirst()Ljava/lang/Object;
move-result-object v0
check-cast v0, Lokhttp3/Headers;
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_1
monitor-exit p0
return-object v0
:catchall_1
move-exception v0
goto :goto_3
:cond_1
:try_start_3
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->errorException:Ljava/io/IOException;
if-eqz v0, :cond_2
goto :goto_1
.line 159
:cond_2
new-instance v0, Lokhttp3/internal/http2/StreamResetException;
iget-object v1, p0, Lokhttp3/internal/http2/Http2Stream;->errorCode:Lokhttp3/internal/http2/ErrorCode;
invoke-direct {v0, v1}, Lokhttp3/internal/http2/StreamResetException;-><init>(Lokhttp3/internal/http2/ErrorCode;)V
:goto_1
throw v0
:goto_2
iget-object v1, p0, Lokhttp3/internal/http2/Http2Stream;->readTimeout:Lokhttp3/internal/http2/Http2Stream$StreamTimeout;
.line 154
invoke-virtual {v1}, Lokhttp3/internal/http2/Http2Stream$StreamTimeout;->exitAndThrowIfTimedOut()V
throw v0
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_1
:goto_3
monitor-exit p0
throw v0
.end method
.method public waitForIo()V
.locals 1
.line 660
:try_start_0
invoke-virtual {p0}, Ljava/lang/Object;->wait()V
:try_end_0
.catch Ljava/lang/InterruptedException; {:try_start_0 .. :try_end_0} :catch_0
return-void
.line 662
:catch_0
invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/Thread;->interrupt()V
.line 663
new-instance v0, Ljava/io/InterruptedIOException;
invoke-direct {v0}, Ljava/io/InterruptedIOException;-><init>()V
throw v0
.end method
.method public writeTimeout()Lokio/Timeout;
.locals 1
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->writeTimeout:Lokhttp3/internal/http2/Http2Stream$StreamTimeout;
return-object v0
.end method

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,69 @@
.class public final Lokhttp3/internal/http2/Huffman$Node;
.super Ljava/lang/Object;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lokhttp3/internal/http2/Huffman;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "Node"
.end annotation
# instance fields
.field public final children:[Lokhttp3/internal/http2/Huffman$Node;
.field public final symbol:I
.field public final terminalBits:I
# direct methods
.method public constructor <init>()V
.locals 1
.line 208
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
const/16 v0, 0x100
new-array v0, v0, [Lokhttp3/internal/http2/Huffman$Node;
iput-object v0, p0, Lokhttp3/internal/http2/Huffman$Node;->children:[Lokhttp3/internal/http2/Huffman$Node;
const/4 v0, 0x0
iput v0, p0, Lokhttp3/internal/http2/Huffman$Node;->symbol:I
iput v0, p0, Lokhttp3/internal/http2/Huffman$Node;->terminalBits:I
return-void
.end method
.method public constructor <init>(II)V
.locals 1
.line 220
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
const/4 v0, 0x0
iput-object v0, p0, Lokhttp3/internal/http2/Huffman$Node;->children:[Lokhttp3/internal/http2/Huffman$Node;
iput p1, p0, Lokhttp3/internal/http2/Huffman$Node;->symbol:I
and-int/lit8 p1, p2, 0x7
if-nez p1, :cond_0
const/16 p1, 0x8
:cond_0
iput p1, p0, Lokhttp3/internal/http2/Huffman$Node;->terminalBits:I
return-void
.end method

View File

@@ -0,0 +1,985 @@
.class public Lokhttp3/internal/http2/Huffman;
.super Ljava/lang/Object;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lokhttp3/internal/http2/Huffman$Node;
}
.end annotation
# static fields
.field public static final CODES:[I
.field public static final CODE_LENGTHS:[B
.field public static final INSTANCE:Lokhttp3/internal/http2/Huffman;
# instance fields
.field public final root:Lokhttp3/internal/http2/Huffman$Node;
# direct methods
.method static constructor <clinit>()V
.locals 2
const/16 v0, 0x100
new-array v1, v0, [I
fill-array-data v1, :array_0
sput-object v1, Lokhttp3/internal/http2/Huffman;->CODES:[I
new-array v0, v0, [B
fill-array-data v0, :array_1
sput-object v0, Lokhttp3/internal/http2/Huffman;->CODE_LENGTHS:[B
.line 79
new-instance v0, Lokhttp3/internal/http2/Huffman;
invoke-direct {v0}, Lokhttp3/internal/http2/Huffman;-><init>()V
sput-object v0, Lokhttp3/internal/http2/Huffman;->INSTANCE:Lokhttp3/internal/http2/Huffman;
return-void
:array_0
.array-data 4
0x1ff8
0x7fffd8
0xfffffe2
0xfffffe3
0xfffffe4
0xfffffe5
0xfffffe6
0xfffffe7
0xfffffe8
0xffffea
0x3ffffffc # 1.9999995f
0xfffffe9
0xfffffea
0x3ffffffd # 1.9999996f
0xfffffeb
0xfffffec
0xfffffed
0xfffffee
0xfffffef
0xffffff0
0xffffff1
0xffffff2
0x3ffffffe # 1.9999998f
0xffffff3
0xffffff4
0xffffff5
0xffffff6
0xffffff7
0xffffff8
0xffffff9
0xffffffa
0xffffffb
0x14
0x3f8
0x3f9
0xffa
0x1ff9
0x15
0xf8
0x7fa
0x3fa
0x3fb
0xf9
0x7fb
0xfa
0x16
0x17
0x18
0x0
0x1
0x2
0x19
0x1a
0x1b
0x1c
0x1d
0x1e
0x1f
0x5c
0xfb
0x7ffc
0x20
0xffb
0x3fc
0x1ffa
0x21
0x5d
0x5e
0x5f
0x60
0x61
0x62
0x63
0x64
0x65
0x66
0x67
0x68
0x69
0x6a
0x6b
0x6c
0x6d
0x6e
0x6f
0x70
0x71
0x72
0xfc
0x73
0xfd
0x1ffb
0x7fff0
0x1ffc
0x3ffc
0x22
0x7ffd
0x3
0x23
0x4
0x24
0x5
0x25
0x26
0x27
0x6
0x74
0x75
0x28
0x29
0x2a
0x7
0x2b
0x76
0x2c
0x8
0x9
0x2d
0x77
0x78
0x79
0x7a
0x7b
0x7ffe
0x7fc
0x3ffd
0x1ffd
0xffffffc
0xfffe6
0x3fffd2
0xfffe7
0xfffe8
0x3fffd3
0x3fffd4
0x3fffd5
0x7fffd9
0x3fffd6
0x7fffda
0x7fffdb
0x7fffdc
0x7fffdd
0x7fffde
0xffffeb
0x7fffdf
0xffffec
0xffffed
0x3fffd7
0x7fffe0
0xffffee
0x7fffe1
0x7fffe2
0x7fffe3
0x7fffe4
0x1fffdc
0x3fffd8
0x7fffe5
0x3fffd9
0x7fffe6
0x7fffe7
0xffffef
0x3fffda
0x1fffdd
0xfffe9
0x3fffdb
0x3fffdc
0x7fffe8
0x7fffe9
0x1fffde
0x7fffea
0x3fffdd
0x3fffde
0xfffff0
0x1fffdf
0x3fffdf
0x7fffeb
0x7fffec
0x1fffe0
0x1fffe1
0x3fffe0
0x1fffe2
0x7fffed
0x3fffe1
0x7fffee
0x7fffef
0xfffea
0x3fffe2
0x3fffe3
0x3fffe4
0x7ffff0
0x3fffe5
0x3fffe6
0x7ffff1
0x3ffffe0
0x3ffffe1
0xfffeb
0x7fff1
0x3fffe7
0x7ffff2
0x3fffe8
0x1ffffec
0x3ffffe2
0x3ffffe3
0x3ffffe4
0x7ffffde
0x7ffffdf
0x3ffffe5
0xfffff1
0x1ffffed
0x7fff2
0x1fffe3
0x3ffffe6
0x7ffffe0
0x7ffffe1
0x3ffffe7
0x7ffffe2
0xfffff2
0x1fffe4
0x1fffe5
0x3ffffe8
0x3ffffe9
0xffffffd
0x7ffffe3
0x7ffffe4
0x7ffffe5
0xfffec
0xfffff3
0xfffed
0x1fffe6
0x3fffe9
0x1fffe7
0x1fffe8
0x7ffff3
0x3fffea
0x3fffeb
0x1ffffee
0x1ffffef
0xfffff4
0xfffff5
0x3ffffea
0x7ffff4
0x3ffffeb
0x7ffffe6
0x3ffffec
0x3ffffed
0x7ffffe7
0x7ffffe8
0x7ffffe9
0x7ffffea
0x7ffffeb
0xffffffe
0x7ffffec
0x7ffffed
0x7ffffee
0x7ffffef
0x7fffff0
0x3ffffee
.end array-data
:array_1
.array-data 1
0xdt
0x17t
0x1ct
0x1ct
0x1ct
0x1ct
0x1ct
0x1ct
0x1ct
0x18t
0x1et
0x1ct
0x1ct
0x1et
0x1ct
0x1ct
0x1ct
0x1ct
0x1ct
0x1ct
0x1ct
0x1ct
0x1et
0x1ct
0x1ct
0x1ct
0x1ct
0x1ct
0x1ct
0x1ct
0x1ct
0x1ct
0x6t
0xat
0xat
0xct
0xdt
0x6t
0x8t
0xbt
0xat
0xat
0x8t
0xbt
0x8t
0x6t
0x6t
0x6t
0x5t
0x5t
0x5t
0x6t
0x6t
0x6t
0x6t
0x6t
0x6t
0x6t
0x7t
0x8t
0xft
0x6t
0xct
0xat
0xdt
0x6t
0x7t
0x7t
0x7t
0x7t
0x7t
0x7t
0x7t
0x7t
0x7t
0x7t
0x7t
0x7t
0x7t
0x7t
0x7t
0x7t
0x7t
0x7t
0x7t
0x7t
0x7t
0x7t
0x8t
0x7t
0x8t
0xdt
0x13t
0xdt
0xet
0x6t
0xft
0x5t
0x6t
0x5t
0x6t
0x5t
0x6t
0x6t
0x6t
0x5t
0x7t
0x7t
0x6t
0x6t
0x6t
0x5t
0x6t
0x7t
0x6t
0x5t
0x5t
0x6t
0x7t
0x7t
0x7t
0x7t
0x7t
0xft
0xbt
0xet
0xdt
0x1ct
0x14t
0x16t
0x14t
0x14t
0x16t
0x16t
0x16t
0x17t
0x16t
0x17t
0x17t
0x17t
0x17t
0x17t
0x18t
0x17t
0x18t
0x18t
0x16t
0x17t
0x18t
0x17t
0x17t
0x17t
0x17t
0x15t
0x16t
0x17t
0x16t
0x17t
0x17t
0x18t
0x16t
0x15t
0x14t
0x16t
0x16t
0x17t
0x17t
0x15t
0x17t
0x16t
0x16t
0x18t
0x15t
0x16t
0x17t
0x17t
0x15t
0x15t
0x16t
0x15t
0x17t
0x16t
0x17t
0x17t
0x14t
0x16t
0x16t
0x16t
0x17t
0x16t
0x16t
0x17t
0x1at
0x1at
0x14t
0x13t
0x16t
0x17t
0x16t
0x19t
0x1at
0x1at
0x1at
0x1bt
0x1bt
0x1at
0x18t
0x19t
0x13t
0x15t
0x1at
0x1bt
0x1bt
0x1at
0x1bt
0x18t
0x15t
0x15t
0x1at
0x1at
0x1ct
0x1bt
0x1bt
0x1bt
0x14t
0x18t
0x14t
0x15t
0x16t
0x15t
0x15t
0x17t
0x16t
0x16t
0x19t
0x19t
0x18t
0x18t
0x1at
0x17t
0x1at
0x1bt
0x1at
0x1at
0x1bt
0x1bt
0x1bt
0x1bt
0x1bt
0x1ct
0x1bt
0x1bt
0x1bt
0x1bt
0x1bt
0x1at
.end array-data
.end method
.method public constructor <init>()V
.locals 1
.line 87
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 85
new-instance v0, Lokhttp3/internal/http2/Huffman$Node;
invoke-direct {v0}, Lokhttp3/internal/http2/Huffman$Node;-><init>()V
iput-object v0, p0, Lokhttp3/internal/http2/Huffman;->root:Lokhttp3/internal/http2/Huffman$Node;
.line 88
invoke-virtual {p0}, Lokhttp3/internal/http2/Huffman;->buildTree()V
return-void
.end method
.method public static get()Lokhttp3/internal/http2/Huffman;
.locals 1
sget-object v0, Lokhttp3/internal/http2/Huffman;->INSTANCE:Lokhttp3/internal/http2/Huffman;
return-object v0
.end method
# virtual methods
.method public final addCode(IIB)V
.locals 4
.line 173
new-instance v0, Lokhttp3/internal/http2/Huffman$Node;
invoke-direct {v0, p1, p3}, Lokhttp3/internal/http2/Huffman$Node;-><init>(II)V
iget-object p1, p0, Lokhttp3/internal/http2/Huffman;->root:Lokhttp3/internal/http2/Huffman$Node;
:goto_0
const/16 v1, 0x8
if-le p3, v1, :cond_2
add-int/lit8 p3, p3, -0x8
int-to-byte p3, p3
ushr-int v1, p2, p3
and-int/lit16 v1, v1, 0xff
.line 179
iget-object v2, p1, Lokhttp3/internal/http2/Huffman$Node;->children:[Lokhttp3/internal/http2/Huffman$Node;
if-eqz v2, :cond_1
.line 182
aget-object v3, v2, v1
if-nez v3, :cond_0
.line 183
new-instance v3, Lokhttp3/internal/http2/Huffman$Node;
invoke-direct {v3}, Lokhttp3/internal/http2/Huffman$Node;-><init>()V
aput-object v3, v2, v1
.line 185
:cond_0
iget-object p1, p1, Lokhttp3/internal/http2/Huffman$Node;->children:[Lokhttp3/internal/http2/Huffman$Node;
aget-object p1, p1, v1
goto :goto_0
.line 180
:cond_1
new-instance p1, Ljava/lang/IllegalStateException;
const-string p2, "invalid dictionary: prefix not unique"
invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p1
:cond_2
sub-int/2addr v1, p3
shl-int/2addr p2, v1
and-int/lit16 p2, p2, 0xff
const/4 p3, 0x1
shl-int/2addr p3, v1
move v1, p2
:goto_1
add-int v2, p2, p3
if-ge v1, v2, :cond_3
.line 192
iget-object v2, p1, Lokhttp3/internal/http2/Huffman$Node;->children:[Lokhttp3/internal/http2/Huffman$Node;
aput-object v0, v2, v1
add-int/lit8 v1, v1, 0x1
goto :goto_1
:cond_3
return-void
.end method
.method public final buildTree()V
.locals 3
const/4 v0, 0x0
:goto_0
sget-object v1, Lokhttp3/internal/http2/Huffman;->CODE_LENGTHS:[B
.line 167
array-length v2, v1
if-ge v0, v2, :cond_0
sget-object v2, Lokhttp3/internal/http2/Huffman;->CODES:[I
.line 168
aget v2, v2, v0
aget-byte v1, v1, v0
invoke-virtual {p0, v0, v2, v1}, Lokhttp3/internal/http2/Huffman;->addCode(IIB)V
add-int/lit8 v0, v0, 0x1
goto :goto_0
:cond_0
return-void
.end method
.method public decode([B)[B
.locals 6
.line 129
new-instance v0, Ljava/io/ByteArrayOutputStream;
invoke-direct {v0}, Ljava/io/ByteArrayOutputStream;-><init>()V
iget-object v1, p0, Lokhttp3/internal/http2/Huffman;->root:Lokhttp3/internal/http2/Huffman$Node;
const/4 v2, 0x0
move v3, v2
move v4, v3
.line 133
:goto_0
array-length v5, p1
if-ge v2, v5, :cond_2
.line 134
aget-byte v5, p1, v2
and-int/lit16 v5, v5, 0xff
shl-int/lit8 v3, v3, 0x8
or-int/2addr v3, v5
add-int/lit8 v4, v4, 0x8
:goto_1
const/16 v5, 0x8
if-lt v4, v5, :cond_1
add-int/lit8 v5, v4, -0x8
ushr-int v5, v3, v5
and-int/lit16 v5, v5, 0xff
.line 139
iget-object v1, v1, Lokhttp3/internal/http2/Huffman$Node;->children:[Lokhttp3/internal/http2/Huffman$Node;
aget-object v1, v1, v5
.line 140
iget-object v5, v1, Lokhttp3/internal/http2/Huffman$Node;->children:[Lokhttp3/internal/http2/Huffman$Node;
if-nez v5, :cond_0
.line 142
iget v5, v1, Lokhttp3/internal/http2/Huffman$Node;->symbol:I
invoke-virtual {v0, v5}, Ljava/io/ByteArrayOutputStream;->write(I)V
.line 143
iget v1, v1, Lokhttp3/internal/http2/Huffman$Node;->terminalBits:I
sub-int/2addr v4, v1
iget-object v1, p0, Lokhttp3/internal/http2/Huffman;->root:Lokhttp3/internal/http2/Huffman$Node;
goto :goto_1
:cond_0
add-int/lit8 v4, v4, -0x8
goto :goto_1
:cond_1
add-int/lit8 v2, v2, 0x1
goto :goto_0
:cond_2
:goto_2
if-lez v4, :cond_4
rsub-int/lit8 p1, v4, 0x8
shl-int p1, v3, p1
and-int/lit16 p1, p1, 0xff
.line 154
iget-object v1, v1, Lokhttp3/internal/http2/Huffman$Node;->children:[Lokhttp3/internal/http2/Huffman$Node;
aget-object p1, v1, p1
.line 155
iget-object v1, p1, Lokhttp3/internal/http2/Huffman$Node;->children:[Lokhttp3/internal/http2/Huffman$Node;
if-nez v1, :cond_4
iget v1, p1, Lokhttp3/internal/http2/Huffman$Node;->terminalBits:I
if-le v1, v4, :cond_3
goto :goto_3
.line 158
:cond_3
iget v1, p1, Lokhttp3/internal/http2/Huffman$Node;->symbol:I
invoke-virtual {v0, v1}, Ljava/io/ByteArrayOutputStream;->write(I)V
.line 159
iget p1, p1, Lokhttp3/internal/http2/Huffman$Node;->terminalBits:I
sub-int/2addr v4, p1
iget-object v1, p0, Lokhttp3/internal/http2/Huffman;->root:Lokhttp3/internal/http2/Huffman$Node;
goto :goto_2
.line 163
:cond_4
:goto_3
invoke-virtual {v0}, Ljava/io/ByteArrayOutputStream;->toByteArray()[B
move-result-object p1
return-object p1
.end method
.method public encode(Lokio/ByteString;Lokio/BufferedSink;)V
.locals 7
const-wide/16 v0, 0x0
const/4 v2, 0x0
move v3, v2
.line 95
:goto_0
invoke-virtual {p1}, Lokio/ByteString;->size()I
move-result v4
const/16 v5, 0xff
if-ge v2, v4, :cond_1
.line 96
invoke-virtual {p1, v2}, Lokio/ByteString;->getByte(I)B
move-result v4
and-int/2addr v4, v5
sget-object v5, Lokhttp3/internal/http2/Huffman;->CODES:[I
.line 97
aget v5, v5, v4
sget-object v6, Lokhttp3/internal/http2/Huffman;->CODE_LENGTHS:[B
.line 98
aget-byte v4, v6, v4
shl-long/2addr v0, v4
int-to-long v5, v5
or-long/2addr v0, v5
add-int/2addr v3, v4
:goto_1
const/16 v4, 0x8
if-lt v3, v4, :cond_0
add-int/lit8 v3, v3, -0x8
shr-long v4, v0, v3
long-to-int v4, v4
.line 106
invoke-interface {p2, v4}, Lokio/BufferedSink;->writeByte(I)Lokio/BufferedSink;
goto :goto_1
:cond_0
add-int/lit8 v2, v2, 0x1
goto :goto_0
:cond_1
if-lez v3, :cond_2
rsub-int/lit8 p1, v3, 0x8
shl-long/2addr v0, p1
ushr-int p1, v5, v3
int-to-long v2, p1
or-long/2addr v0, v2
long-to-int p1, v0
.line 113
invoke-interface {p2, p1}, Lokio/BufferedSink;->writeByte(I)Lokio/BufferedSink;
:cond_2
return-void
.end method
.method public encodedLength(Lokio/ByteString;)I
.locals 5
const-wide/16 v0, 0x0
const/4 v2, 0x0
.line 120
:goto_0
invoke-virtual {p1}, Lokio/ByteString;->size()I
move-result v3
if-ge v2, v3, :cond_0
.line 121
invoke-virtual {p1, v2}, Lokio/ByteString;->getByte(I)B
move-result v3
and-int/lit16 v3, v3, 0xff
sget-object v4, Lokhttp3/internal/http2/Huffman;->CODE_LENGTHS:[B
.line 122
aget-byte v3, v4, v3
int-to-long v3, v3
add-long/2addr v0, v3
add-int/lit8 v2, v2, 0x1
goto :goto_0
:cond_0
const-wide/16 v2, 0x7
add-long/2addr v0, v2
const/4 p1, 0x3
shr-long/2addr v0, p1
long-to-int p1, v0
return p1
.end method

View File

@@ -0,0 +1,65 @@
.class public Lokhttp3/internal/http2/PushObserver$1;
.super Ljava/lang/Object;
.source "SourceFile"
# interfaces
.implements Lokhttp3/internal/http2/PushObserver;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lokhttp3/internal/http2/PushObserver;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1
name = null
.end annotation
# direct methods
.method public constructor <init>()V
.locals 0
.line 76
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public onData(ILokio/BufferedSource;IZ)Z
.locals 0
int-to-long p3, p3
.line 88
invoke-interface {p2, p3, p4}, Lokio/BufferedSource;->skip(J)V
const/4 p1, 0x1
return p1
.end method
.method public onHeaders(ILjava/util/List;Z)Z
.locals 0
const/4 p1, 0x1
return p1
.end method
.method public onRequest(ILjava/util/List;)Z
.locals 0
const/4 p1, 0x1
return p1
.end method
.method public onReset(ILokhttp3/internal/http2/ErrorCode;)V
.locals 0
return-void
.end method

View File

@@ -0,0 +1,36 @@
.class public interface abstract Lokhttp3/internal/http2/PushObserver;
.super Ljava/lang/Object;
.source "SourceFile"
# static fields
.field public static final CANCEL:Lokhttp3/internal/http2/PushObserver;
# direct methods
.method static constructor <clinit>()V
.locals 1
.line 76
new-instance v0, Lokhttp3/internal/http2/PushObserver$1;
invoke-direct {v0}, Lokhttp3/internal/http2/PushObserver$1;-><init>()V
sput-object v0, Lokhttp3/internal/http2/PushObserver;->CANCEL:Lokhttp3/internal/http2/PushObserver;
return-void
.end method
# virtual methods
.method public abstract onData(ILokio/BufferedSource;IZ)Z
.end method
.method public abstract onHeaders(ILjava/util/List;Z)Z
.end method
.method public abstract onRequest(ILjava/util/List;)Z
.end method
.method public abstract onReset(ILokhttp3/internal/http2/ErrorCode;)V
.end method

View File

@@ -0,0 +1,248 @@
.class public final Lokhttp3/internal/http2/Settings;
.super Ljava/lang/Object;
.source "SourceFile"
# instance fields
.field public set:I
.field public final values:[I
# direct methods
.method public constructor <init>()V
.locals 1
.line 24
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
const/16 v0, 0xa
new-array v0, v0, [I
iput-object v0, p0, Lokhttp3/internal/http2/Settings;->values:[I
return-void
.end method
# virtual methods
.method public clear()V
.locals 2
const/4 v0, 0x0
iput v0, p0, Lokhttp3/internal/http2/Settings;->set:I
iget-object v1, p0, Lokhttp3/internal/http2/Settings;->values:[I
.line 55
invoke-static {v1, v0}, Ljava/util/Arrays;->fill([II)V
return-void
.end method
.method public get(I)I
.locals 1
iget-object v0, p0, Lokhttp3/internal/http2/Settings;->values:[I
.line 77
aget p1, v0, p1
return p1
.end method
.method public getHeaderTableSize()I
.locals 2
iget v0, p0, Lokhttp3/internal/http2/Settings;->set:I
and-int/lit8 v0, v0, 0x2
if-eqz v0, :cond_0
iget-object v0, p0, Lokhttp3/internal/http2/Settings;->values:[I
const/4 v1, 0x1
.line 88
aget v0, v0, v1
goto :goto_0
:cond_0
const/4 v0, -0x1
:goto_0
return v0
.end method
.method public getInitialWindowSize()I
.locals 2
iget v0, p0, Lokhttp3/internal/http2/Settings;->set:I
and-int/lit16 v0, v0, 0x80
if-eqz v0, :cond_0
iget-object v0, p0, Lokhttp3/internal/http2/Settings;->values:[I
const/4 v1, 0x7
.line 114
aget v0, v0, v1
goto :goto_0
:cond_0
const v0, 0xffff
:goto_0
return v0
.end method
.method public getMaxConcurrentStreams(I)I
.locals 1
iget v0, p0, Lokhttp3/internal/http2/Settings;->set:I
and-int/lit8 v0, v0, 0x10
if-eqz v0, :cond_0
iget-object p1, p0, Lokhttp3/internal/http2/Settings;->values:[I
const/4 v0, 0x4
.line 99
aget p1, p1, v0
:cond_0
return p1
.end method
.method public getMaxFrameSize(I)I
.locals 1
iget v0, p0, Lokhttp3/internal/http2/Settings;->set:I
and-int/lit8 v0, v0, 0x20
if-eqz v0, :cond_0
iget-object p1, p0, Lokhttp3/internal/http2/Settings;->values:[I
const/4 v0, 0x5
.line 104
aget p1, p1, v0
:cond_0
return p1
.end method
.method public isSet(I)Z
.locals 2
const/4 v0, 0x1
shl-int p1, v0, p1
iget v1, p0, Lokhttp3/internal/http2/Settings;->set:I
and-int/2addr p1, v1
if-eqz p1, :cond_0
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
return v0
.end method
.method public merge(Lokhttp3/internal/http2/Settings;)V
.locals 2
const/4 v0, 0x0
:goto_0
const/16 v1, 0xa
if-ge v0, v1, :cond_1
.line 123
invoke-virtual {p1, v0}, Lokhttp3/internal/http2/Settings;->isSet(I)Z
move-result v1
if-nez v1, :cond_0
goto :goto_1
.line 124
:cond_0
invoke-virtual {p1, v0}, Lokhttp3/internal/http2/Settings;->get(I)I
move-result v1
invoke-virtual {p0, v0, v1}, Lokhttp3/internal/http2/Settings;->set(II)Lokhttp3/internal/http2/Settings;
:goto_1
add-int/lit8 v0, v0, 0x1
goto :goto_0
:cond_1
return-void
.end method
.method public set(II)Lokhttp3/internal/http2/Settings;
.locals 3
if-ltz p1, :cond_1
iget-object v0, p0, Lokhttp3/internal/http2/Settings;->values:[I
.line 59
array-length v1, v0
if-lt p1, v1, :cond_0
goto :goto_0
:cond_0
const/4 v1, 0x1
shl-int/2addr v1, p1
iget v2, p0, Lokhttp3/internal/http2/Settings;->set:I
or-int/2addr v1, v2
iput v1, p0, Lokhttp3/internal/http2/Settings;->set:I
.line 65
aput p2, v0, p1
:cond_1
:goto_0
return-object p0
.end method
.method public size()I
.locals 1
iget v0, p0, Lokhttp3/internal/http2/Settings;->set:I
.line 82
invoke-static {v0}, Ljava/lang/Integer;->bitCount(I)I
move-result v0
return v0
.end method

View File

@@ -0,0 +1,34 @@
.class public final Lokhttp3/internal/http2/StreamResetException;
.super Ljava/io/IOException;
.source "SourceFile"
# instance fields
.field public final errorCode:Lokhttp3/internal/http2/ErrorCode;
# direct methods
.method public constructor <init>(Lokhttp3/internal/http2/ErrorCode;)V
.locals 2
.line 25
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const-string v1, "stream was reset: "
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
invoke-direct {p0, v0}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
iput-object p1, p0, Lokhttp3/internal/http2/StreamResetException;->errorCode:Lokhttp3/internal/http2/ErrorCode;
return-void
.end method

View File

@@ -0,0 +1,300 @@
.class public Lokhttp3/internal/io/FileSystem$1;
.super Ljava/lang/Object;
.source "SourceFile"
# interfaces
.implements Lokhttp3/internal/io/FileSystem;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lokhttp3/internal/io/FileSystem;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1
name = null
.end annotation
# direct methods
.method public constructor <init>()V
.locals 0
.line 42
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public appendingSink(Ljava/io/File;)Lokio/Sink;
.locals 1
.line 59
:try_start_0
invoke-static {p1}, Lokio/Okio;->appendingSink(Ljava/io/File;)Lokio/Sink;
move-result-object p1
:try_end_0
.catch Ljava/io/FileNotFoundException; {:try_start_0 .. :try_end_0} :catch_0
return-object p1
.line 62
:catch_0
invoke-virtual {p1}, Ljava/io/File;->getParentFile()Ljava/io/File;
move-result-object v0
invoke-virtual {v0}, Ljava/io/File;->mkdirs()Z
.line 63
invoke-static {p1}, Lokio/Okio;->appendingSink(Ljava/io/File;)Lokio/Sink;
move-result-object p1
return-object p1
.end method
.method public delete(Ljava/io/File;)V
.locals 3
.line 69
invoke-virtual {p1}, Ljava/io/File;->delete()Z
move-result v0
if-nez v0, :cond_1
invoke-virtual {p1}, Ljava/io/File;->exists()Z
move-result v0
if-nez v0, :cond_0
goto :goto_0
.line 70
:cond_0
new-instance v0, Ljava/io/IOException;
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "failed to delete "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {v0, p1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
throw v0
:cond_1
:goto_0
return-void
.end method
.method public deleteContents(Ljava/io/File;)V
.locals 4
.line 90
invoke-virtual {p1}, Ljava/io/File;->listFiles()[Ljava/io/File;
move-result-object v0
if-eqz v0, :cond_3
.line 94
array-length p1, v0
const/4 v1, 0x0
:goto_0
if-ge v1, p1, :cond_2
aget-object v2, v0, v1
.line 95
invoke-virtual {v2}, Ljava/io/File;->isDirectory()Z
move-result v3
if-eqz v3, :cond_0
.line 96
invoke-virtual {p0, v2}, Lokhttp3/internal/io/FileSystem$1;->deleteContents(Ljava/io/File;)V
.line 98
:cond_0
invoke-virtual {v2}, Ljava/io/File;->delete()Z
move-result v3
if-eqz v3, :cond_1
add-int/lit8 v1, v1, 0x1
goto :goto_0
.line 99
:cond_1
new-instance p1, Ljava/io/IOException;
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const-string v1, "failed to delete "
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
invoke-direct {p1, v0}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
throw p1
:cond_2
return-void
.line 92
:cond_3
new-instance v0, Ljava/io/IOException;
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "not a readable directory: "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {v0, p1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
throw v0
.end method
.method public exists(Ljava/io/File;)Z
.locals 0
.line 75
invoke-virtual {p1}, Ljava/io/File;->exists()Z
move-result p1
return p1
.end method
.method public rename(Ljava/io/File;Ljava/io/File;)V
.locals 3
.line 83
invoke-virtual {p0, p2}, Lokhttp3/internal/io/FileSystem$1;->delete(Ljava/io/File;)V
.line 84
invoke-virtual {p1, p2}, Ljava/io/File;->renameTo(Ljava/io/File;)Z
move-result v0
if-eqz v0, :cond_0
return-void
.line 85
:cond_0
new-instance v0, Ljava/io/IOException;
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "failed to rename "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
const-string p1, " to "
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {v0, p1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
throw v0
.end method
.method public sink(Ljava/io/File;)Lokio/Sink;
.locals 1
.line 49
:try_start_0
invoke-static {p1}, Lokio/Okio;->sink(Ljava/io/File;)Lokio/Sink;
move-result-object p1
:try_end_0
.catch Ljava/io/FileNotFoundException; {:try_start_0 .. :try_end_0} :catch_0
return-object p1
.line 52
:catch_0
invoke-virtual {p1}, Ljava/io/File;->getParentFile()Ljava/io/File;
move-result-object v0
invoke-virtual {v0}, Ljava/io/File;->mkdirs()Z
.line 53
invoke-static {p1}, Lokio/Okio;->sink(Ljava/io/File;)Lokio/Sink;
move-result-object p1
return-object p1
.end method
.method public size(Ljava/io/File;)J
.locals 2
.line 79
invoke-virtual {p1}, Ljava/io/File;->length()J
move-result-wide v0
return-wide v0
.end method
.method public source(Ljava/io/File;)Lokio/Source;
.locals 0
.line 44
invoke-static {p1}, Lokio/Okio;->source(Ljava/io/File;)Lokio/Source;
move-result-object p1
return-object p1
.end method

View File

@@ -0,0 +1,48 @@
.class public interface abstract Lokhttp3/internal/io/FileSystem;
.super Ljava/lang/Object;
.source "SourceFile"
# static fields
.field public static final SYSTEM:Lokhttp3/internal/io/FileSystem;
# direct methods
.method static constructor <clinit>()V
.locals 1
.line 42
new-instance v0, Lokhttp3/internal/io/FileSystem$1;
invoke-direct {v0}, Lokhttp3/internal/io/FileSystem$1;-><init>()V
sput-object v0, Lokhttp3/internal/io/FileSystem;->SYSTEM:Lokhttp3/internal/io/FileSystem;
return-void
.end method
# virtual methods
.method public abstract appendingSink(Ljava/io/File;)Lokio/Sink;
.end method
.method public abstract delete(Ljava/io/File;)V
.end method
.method public abstract deleteContents(Ljava/io/File;)V
.end method
.method public abstract exists(Ljava/io/File;)Z
.end method
.method public abstract rename(Ljava/io/File;Ljava/io/File;)V
.end method
.method public abstract sink(Ljava/io/File;)Lokio/Sink;
.end method
.method public abstract size(Ljava/io/File;)J
.end method
.method public abstract source(Ljava/io/File;)Lokio/Source;
.end method

View File

@@ -0,0 +1,174 @@
.class public Lokhttp3/internal/platform/Android10Platform;
.super Lokhttp3/internal/platform/AndroidPlatform;
.source "SourceFile"
# direct methods
.method public constructor <init>(Ljava/lang/Class;)V
.locals 7
const/4 v2, 0x0
const/4 v3, 0x0
const/4 v4, 0x0
const/4 v5, 0x0
const/4 v6, 0x0
move-object v0, p0
move-object v1, p1
.line 32
invoke-direct/range {v0 .. v6}, Lokhttp3/internal/platform/AndroidPlatform;-><init>(Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/reflect/Method;Ljava/lang/reflect/Method;Ljava/lang/reflect/Method;Ljava/lang/reflect/Method;)V
return-void
.end method
.method public static buildIfSupported()Lokhttp3/internal/platform/Platform;
.locals 3
.line 73
invoke-static {}, Lokhttp3/internal/platform/Platform;->isAndroid()Z
move-result v0
const/4 v1, 0x0
if-nez v0, :cond_0
return-object v1
.line 78
:cond_0
:try_start_0
invoke-static {}, Lokhttp3/internal/platform/AndroidPlatform;->getSdkInt()I
move-result v0
const/16 v2, 0x1d
if-lt v0, v2, :cond_1
const-string v0, "com.android.org.conscrypt.SSLParametersImpl"
.line 80
invoke-static {v0}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;
move-result-object v0
.line 82
new-instance v2, Lokhttp3/internal/platform/Android10Platform;
invoke-direct {v2, v0}, Lokhttp3/internal/platform/Android10Platform;-><init>(Ljava/lang/Class;)V
:try_end_0
.catch Ljava/lang/ReflectiveOperationException; {:try_start_0 .. :try_end_0} :catch_0
return-object v2
:catch_0
:cond_1
return-object v1
.end method
# virtual methods
.method public configureTlsExtensions(Ljavax/net/ssl/SSLSocket;Ljava/lang/String;Ljava/util/List;)V
.locals 1
.line 40
:try_start_0
invoke-virtual {p0, p1}, Lokhttp3/internal/platform/Android10Platform;->enableSessionTickets(Ljavax/net/ssl/SSLSocket;)V
.line 42
invoke-virtual {p1}, Ljavax/net/ssl/SSLSocket;->getSSLParameters()Ljavax/net/ssl/SSLParameters;
move-result-object p2
.line 45
invoke-static {p3}, Lokhttp3/internal/platform/Platform;->alpnProtocolNames(Ljava/util/List;)Ljava/util/List;
move-result-object p3
const/4 v0, 0x0
new-array v0, v0, [Ljava/lang/String;
invoke-interface {p3, v0}, Ljava/util/List;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;
move-result-object p3
check-cast p3, [Ljava/lang/String;
.line 46
invoke-static {p2, p3}, Lcom/mbridge/msdk/thrid/okhttp/internal/platform/Android10Platform$$ExternalSyntheticApiModelOutline0;->m(Ljavax/net/ssl/SSLParameters;[Ljava/lang/String;)V
.line 48
invoke-virtual {p1, p2}, Ljavax/net/ssl/SSLSocket;->setSSLParameters(Ljavax/net/ssl/SSLParameters;)V
:try_end_0
.catch Ljava/lang/IllegalArgumentException; {:try_start_0 .. :try_end_0} :catch_0
return-void
:catch_0
move-exception p1
.line 51
new-instance p2, Ljava/io/IOException;
const-string p3, "Android internal error"
invoke-direct {p2, p3, p1}, Ljava/io/IOException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
throw p2
.end method
.method public final enableSessionTickets(Ljavax/net/ssl/SSLSocket;)V
.locals 1
.line 56
invoke-static {p1}, Lcom/mbridge/msdk/thrid/okhttp/internal/platform/Android10Platform$$ExternalSyntheticApiModelOutline2;->m(Ljavax/net/ssl/SSLSocket;)Z
move-result v0
if-eqz v0, :cond_0
const/4 v0, 0x1
.line 57
invoke-static {p1, v0}, Lcom/mbridge/msdk/thrid/okhttp/internal/platform/Android10Platform$$ExternalSyntheticApiModelOutline3;->m(Ljavax/net/ssl/SSLSocket;Z)V
:cond_0
return-void
.end method
.method public getSelectedProtocol(Ljavax/net/ssl/SSLSocket;)Ljava/lang/String;
.locals 1
.line 63
invoke-static {p1}, Lcom/mbridge/msdk/thrid/okhttp/internal/platform/Android10Platform$$ExternalSyntheticApiModelOutline1;->m(Ljavax/net/ssl/SSLSocket;)Ljava/lang/String;
move-result-object p1
if-eqz p1, :cond_1
.line 65
invoke-virtual {p1}, Ljava/lang/String;->isEmpty()Z
move-result v0
if-eqz v0, :cond_0
goto :goto_0
:cond_0
return-object p1
:cond_1
:goto_0
const/4 p1, 0x0
return-object p1
.end method

View File

@@ -0,0 +1,140 @@
.class public final Lokhttp3/internal/platform/AndroidPlatform$AndroidCertificateChainCleaner;
.super Lokhttp3/internal/tls/CertificateChainCleaner;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lokhttp3/internal/platform/AndroidPlatform;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "AndroidCertificateChainCleaner"
.end annotation
# instance fields
.field public final checkServerTrusted:Ljava/lang/reflect/Method;
.field public final x509TrustManagerExtensions:Ljava/lang/Object;
# direct methods
.method public constructor <init>(Ljava/lang/Object;Ljava/lang/reflect/Method;)V
.locals 0
.line 269
invoke-direct {p0}, Lokhttp3/internal/tls/CertificateChainCleaner;-><init>()V
iput-object p1, p0, Lokhttp3/internal/platform/AndroidPlatform$AndroidCertificateChainCleaner;->x509TrustManagerExtensions:Ljava/lang/Object;
iput-object p2, p0, Lokhttp3/internal/platform/AndroidPlatform$AndroidCertificateChainCleaner;->checkServerTrusted:Ljava/lang/reflect/Method;
return-void
.end method
# virtual methods
.method public clean(Ljava/util/List;Ljava/lang/String;)Ljava/util/List;
.locals 4
.line 278
:try_start_0
invoke-interface {p1}, Ljava/util/List;->size()I
move-result v0
new-array v0, v0, [Ljava/security/cert/X509Certificate;
invoke-interface {p1, v0}, Ljava/util/List;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;
move-result-object p1
check-cast p1, [Ljava/security/cert/X509Certificate;
iget-object v0, p0, Lokhttp3/internal/platform/AndroidPlatform$AndroidCertificateChainCleaner;->checkServerTrusted:Ljava/lang/reflect/Method;
iget-object v1, p0, Lokhttp3/internal/platform/AndroidPlatform$AndroidCertificateChainCleaner;->x509TrustManagerExtensions:Ljava/lang/Object;
const/4 v2, 0x3
new-array v2, v2, [Ljava/lang/Object;
const/4 v3, 0x0
aput-object p1, v2, v3
const-string p1, "RSA"
const/4 v3, 0x1
aput-object p1, v2, v3
const/4 p1, 0x2
aput-object p2, v2, p1
.line 279
invoke-virtual {v0, v1, v2}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p1
check-cast p1, Ljava/util/List;
:try_end_0
.catch Ljava/lang/reflect/InvocationTargetException; {:try_start_0 .. :try_end_0} :catch_1
.catch Ljava/lang/IllegalAccessException; {:try_start_0 .. :try_end_0} :catch_0
return-object p1
:catch_0
move-exception p1
goto :goto_0
:catch_1
move-exception p1
goto :goto_1
.line 286
:goto_0
new-instance p2, Ljava/lang/AssertionError;
invoke-direct {p2, p1}, Ljava/lang/AssertionError;-><init>(Ljava/lang/Object;)V
throw p2
.line 282
:goto_1
new-instance p2, Ljavax/net/ssl/SSLPeerUnverifiedException;
invoke-virtual {p1}, Ljava/lang/Throwable;->getMessage()Ljava/lang/String;
move-result-object v0
invoke-direct {p2, v0}, Ljavax/net/ssl/SSLPeerUnverifiedException;-><init>(Ljava/lang/String;)V
.line 283
invoke-virtual {p2, p1}, Ljava/lang/Throwable;->initCause(Ljava/lang/Throwable;)Ljava/lang/Throwable;
.line 284
throw p2
.end method
.method public equals(Ljava/lang/Object;)Z
.locals 0
.line 291
instance-of p1, p1, Lokhttp3/internal/platform/AndroidPlatform$AndroidCertificateChainCleaner;
return p1
.end method
.method public hashCode()I
.locals 1
const/4 v0, 0x0
return v0
.end method

View File

@@ -0,0 +1,168 @@
.class public final Lokhttp3/internal/platform/AndroidPlatform$CloseGuard;
.super Ljava/lang/Object;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lokhttp3/internal/platform/AndroidPlatform;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "CloseGuard"
.end annotation
# instance fields
.field public final getMethod:Ljava/lang/reflect/Method;
.field public final openMethod:Ljava/lang/reflect/Method;
.field public final warnIfOpenMethod:Ljava/lang/reflect/Method;
# direct methods
.method public constructor <init>(Ljava/lang/reflect/Method;Ljava/lang/reflect/Method;Ljava/lang/reflect/Method;)V
.locals 0
.line 309
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Lokhttp3/internal/platform/AndroidPlatform$CloseGuard;->getMethod:Ljava/lang/reflect/Method;
iput-object p2, p0, Lokhttp3/internal/platform/AndroidPlatform$CloseGuard;->openMethod:Ljava/lang/reflect/Method;
iput-object p3, p0, Lokhttp3/internal/platform/AndroidPlatform$CloseGuard;->warnIfOpenMethod:Ljava/lang/reflect/Method;
return-void
.end method
.method public static get()Lokhttp3/internal/platform/AndroidPlatform$CloseGuard;
.locals 6
:try_start_0
const-string v0, "dalvik.system.CloseGuard"
.line 345
invoke-static {v0}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;
move-result-object v0
const-string v1, "get"
const/4 v2, 0x0
new-array v3, v2, [Ljava/lang/Class;
.line 346
invoke-virtual {v0, v1, v3}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
move-result-object v1
const-string v3, "open"
const/4 v4, 0x1
new-array v4, v4, [Ljava/lang/Class;
const-class v5, Ljava/lang/String;
aput-object v5, v4, v2
.line 347
invoke-virtual {v0, v3, v4}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
move-result-object v3
const-string v4, "warnIfOpen"
new-array v2, v2, [Ljava/lang/Class;
.line 348
invoke-virtual {v0, v4, v2}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
move-result-object v0
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
goto :goto_0
:catch_0
const/4 v1, 0x0
move-object v0, v1
move-object v3, v0
.line 354
:goto_0
new-instance v2, Lokhttp3/internal/platform/AndroidPlatform$CloseGuard;
invoke-direct {v2, v1, v3, v0}, Lokhttp3/internal/platform/AndroidPlatform$CloseGuard;-><init>(Ljava/lang/reflect/Method;Ljava/lang/reflect/Method;Ljava/lang/reflect/Method;)V
return-object v2
.end method
# virtual methods
.method public createAndOpen(Ljava/lang/String;)Ljava/lang/Object;
.locals 3
iget-object v0, p0, Lokhttp3/internal/platform/AndroidPlatform$CloseGuard;->getMethod:Ljava/lang/reflect/Method;
const/4 v1, 0x0
if-eqz v0, :cond_0
const/4 v2, 0x0
:try_start_0
new-array v2, v2, [Ljava/lang/Object;
.line 318
invoke-virtual {v0, v1, v2}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
iget-object v2, p0, Lokhttp3/internal/platform/AndroidPlatform$CloseGuard;->openMethod:Ljava/lang/reflect/Method;
filled-new-array {p1}, [Ljava/lang/Object;
move-result-object p1
.line 319
invoke-virtual {v2, v0, p1}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
return-object v0
:catch_0
:cond_0
return-object v1
.end method
.method public warnIfOpen(Ljava/lang/Object;)Z
.locals 3
const/4 v0, 0x0
if-eqz p1, :cond_0
:try_start_0
iget-object v1, p0, Lokhttp3/internal/platform/AndroidPlatform$CloseGuard;->warnIfOpenMethod:Ljava/lang/reflect/Method;
new-array v2, v0, [Ljava/lang/Object;
.line 331
invoke-virtual {v1, p1, v2}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
const/4 v0, 0x1
:catch_0
:cond_0
return v0
.end method

Some files were not shown because too many files have changed in this diff Show More