mirror of
https://github.com/Pinball3D/Rabbit-R1.git
synced 2025-01-09 13:43:22 +00:00
306 lines
7.7 KiB
Smali
306 lines
7.7 KiB
Smali
.class public final Lokhttp3/internal/ws/MessageDeflater;
|
|
.super Ljava/lang/Object;
|
|
.source "MessageDeflater.kt"
|
|
|
|
# interfaces
|
|
.implements Ljava/io/Closeable;
|
|
|
|
|
|
# annotations
|
|
.annotation runtime Lkotlin/Metadata;
|
|
bv = {
|
|
0x1,
|
|
0x0,
|
|
0x3
|
|
}
|
|
d1 = {
|
|
"\u00002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0002\u0008\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\u0008\u0004\n\u0002\u0018\u0002\n\u0000\u0018\u00002\u00020\u0001B\r\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u00a2\u0006\u0002\u0010\u0004J\u0008\u0010\u000b\u001a\u00020\u000cH\u0016J\u000e\u0010\r\u001a\u00020\u000c2\u0006\u0010\u000e\u001a\u00020\u0006J\u0014\u0010\u000f\u001a\u00020\u0003*\u00020\u00062\u0006\u0010\u0010\u001a\u00020\u0011H\u0002R\u000e\u0010\u0005\u001a\u00020\u0006X\u0082\u0004\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0007\u001a\u00020\u0008X\u0082\u0004\u00a2\u0006\u0002\n\u0000R\u000e\u0010\t\u001a\u00020\nX\u0082\u0004\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0002\u001a\u00020\u0003X\u0082\u0004\u00a2\u0006\u0002\n\u0000\u00a8\u0006\u0012"
|
|
}
|
|
d2 = {
|
|
"Lokhttp3/internal/ws/MessageDeflater;",
|
|
"Ljava/io/Closeable;",
|
|
"noContextTakeover",
|
|
"",
|
|
"(Z)V",
|
|
"deflatedBytes",
|
|
"Lokio/Buffer;",
|
|
"deflater",
|
|
"Ljava/util/zip/Deflater;",
|
|
"deflaterSink",
|
|
"Lokio/DeflaterSink;",
|
|
"close",
|
|
"",
|
|
"deflate",
|
|
"buffer",
|
|
"endsWith",
|
|
"suffix",
|
|
"Lokio/ByteString;",
|
|
"okhttp"
|
|
}
|
|
k = 0x1
|
|
mv = {
|
|
0x1,
|
|
0x4,
|
|
0x0
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field private final deflatedBytes:Lokio/Buffer;
|
|
|
|
.field private final deflater:Ljava/util/zip/Deflater;
|
|
|
|
.field private final deflaterSink:Lokio/DeflaterSink;
|
|
|
|
.field private final noContextTakeover:Z
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Z)V
|
|
.locals 3
|
|
|
|
.line 29
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
iput-boolean p1, p0, Lokhttp3/internal/ws/MessageDeflater;->noContextTakeover:Z
|
|
|
|
.line 32
|
|
new-instance p1, Lokio/Buffer;
|
|
|
|
invoke-direct {p1}, Lokio/Buffer;-><init>()V
|
|
|
|
iput-object p1, p0, Lokhttp3/internal/ws/MessageDeflater;->deflatedBytes:Lokio/Buffer;
|
|
|
|
.line 33
|
|
new-instance v0, Ljava/util/zip/Deflater;
|
|
|
|
const/4 v1, -0x1
|
|
|
|
const/4 v2, 0x1
|
|
|
|
invoke-direct {v0, v1, v2}, Ljava/util/zip/Deflater;-><init>(IZ)V
|
|
|
|
iput-object v0, p0, Lokhttp3/internal/ws/MessageDeflater;->deflater:Ljava/util/zip/Deflater;
|
|
|
|
.line 34
|
|
new-instance v1, Lokio/DeflaterSink;
|
|
|
|
check-cast p1, Lokio/Sink;
|
|
|
|
invoke-direct {v1, p1, v0}, Lokio/DeflaterSink;-><init>(Lokio/Sink;Ljava/util/zip/Deflater;)V
|
|
|
|
iput-object v1, p0, Lokhttp3/internal/ws/MessageDeflater;->deflaterSink:Lokio/DeflaterSink;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final endsWith(Lokio/Buffer;Lokio/ByteString;)Z
|
|
.locals 4
|
|
|
|
.line 64
|
|
invoke-virtual {p1}, Lokio/Buffer;->size()J
|
|
|
|
move-result-wide v0
|
|
|
|
invoke-virtual {p2}, Lokio/ByteString;->size()I
|
|
|
|
move-result p0
|
|
|
|
int-to-long v2, p0
|
|
|
|
sub-long/2addr v0, v2
|
|
|
|
invoke-virtual {p1, v0, v1, p2}, Lokio/Buffer;->rangeEquals(JLokio/ByteString;)Z
|
|
|
|
move-result p0
|
|
|
|
return p0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public close()V
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
iget-object p0, p0, Lokhttp3/internal/ws/MessageDeflater;->deflaterSink:Lokio/DeflaterSink;
|
|
|
|
.line 62
|
|
invoke-virtual {p0}, Lokio/DeflaterSink;->close()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final deflate(Lokio/Buffer;)V
|
|
.locals 6
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "buffer"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/ws/MessageDeflater;->deflatedBytes:Lokio/Buffer;
|
|
|
|
.line 39
|
|
invoke-virtual {v0}, Lokio/Buffer;->size()J
|
|
|
|
move-result-wide v0
|
|
|
|
const-wide/16 v2, 0x0
|
|
|
|
cmp-long v0, v0, v2
|
|
|
|
const/4 v1, 0x1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
move v0, v1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move v0, v2
|
|
|
|
:goto_0
|
|
if-eqz v0, :cond_3
|
|
|
|
iget-boolean v0, p0, Lokhttp3/internal/ws/MessageDeflater;->noContextTakeover:Z
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/ws/MessageDeflater;->deflater:Ljava/util/zip/Deflater;
|
|
|
|
.line 42
|
|
invoke-virtual {v0}, Ljava/util/zip/Deflater;->reset()V
|
|
|
|
:cond_1
|
|
iget-object v0, p0, Lokhttp3/internal/ws/MessageDeflater;->deflaterSink:Lokio/DeflaterSink;
|
|
|
|
.line 45
|
|
invoke-virtual {p1}, Lokio/Buffer;->size()J
|
|
|
|
move-result-wide v3
|
|
|
|
invoke-virtual {v0, p1, v3, v4}, Lokio/DeflaterSink;->write(Lokio/Buffer;J)V
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/ws/MessageDeflater;->deflaterSink:Lokio/DeflaterSink;
|
|
|
|
.line 46
|
|
invoke-virtual {v0}, Lokio/DeflaterSink;->flush()V
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/ws/MessageDeflater;->deflatedBytes:Lokio/Buffer;
|
|
|
|
.line 48
|
|
invoke-static {}, Lokhttp3/internal/ws/MessageDeflaterKt;->access$getEMPTY_DEFLATE_BLOCK$p()Lokio/ByteString;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-direct {p0, v0, v3}, Lokhttp3/internal/ws/MessageDeflater;->endsWith(Lokio/Buffer;Lokio/ByteString;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/ws/MessageDeflater;->deflatedBytes:Lokio/Buffer;
|
|
|
|
.line 49
|
|
invoke-virtual {v0}, Lokio/Buffer;->size()J
|
|
|
|
move-result-wide v2
|
|
|
|
const/4 v0, 0x4
|
|
|
|
int-to-long v4, v0
|
|
|
|
sub-long/2addr v2, v4
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/ws/MessageDeflater;->deflatedBytes:Lokio/Buffer;
|
|
|
|
const/4 v4, 0x0
|
|
|
|
.line 50
|
|
invoke-static {v0, v4, v1, v4}, Lokio/Buffer;->readAndWriteUnsafe$default(Lokio/Buffer;Lokio/Buffer$UnsafeCursor;ILjava/lang/Object;)Lokio/Buffer$UnsafeCursor;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Ljava/io/Closeable;
|
|
|
|
move-object v1, v4
|
|
|
|
check-cast v1, Ljava/lang/Throwable;
|
|
|
|
:try_start_0
|
|
move-object v1, v0
|
|
|
|
check-cast v1, Lokio/Buffer$UnsafeCursor;
|
|
|
|
.line 51
|
|
invoke-virtual {v1, v2, v3}, Lokio/Buffer$UnsafeCursor;->resizeBuffer(J)J
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
.line 50
|
|
invoke-static {v0, v4}, Lkotlin/io/CloseableKt;->closeFinally(Ljava/io/Closeable;Ljava/lang/Throwable;)V
|
|
|
|
goto :goto_1
|
|
|
|
:catchall_0
|
|
move-exception p0
|
|
|
|
:try_start_1
|
|
throw p0
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_1
|
|
|
|
:catchall_1
|
|
move-exception p1
|
|
|
|
invoke-static {v0, p0}, Lkotlin/io/CloseableKt;->closeFinally(Ljava/io/Closeable;Ljava/lang/Throwable;)V
|
|
|
|
throw p1
|
|
|
|
:cond_2
|
|
iget-object v0, p0, Lokhttp3/internal/ws/MessageDeflater;->deflatedBytes:Lokio/Buffer;
|
|
|
|
.line 55
|
|
invoke-virtual {v0, v2}, Lokio/Buffer;->writeByte(I)Lokio/Buffer;
|
|
|
|
:goto_1
|
|
iget-object p0, p0, Lokhttp3/internal/ws/MessageDeflater;->deflatedBytes:Lokio/Buffer;
|
|
|
|
.line 58
|
|
invoke-virtual {p0}, Lokio/Buffer;->size()J
|
|
|
|
move-result-wide v0
|
|
|
|
invoke-virtual {p1, p0, v0, v1}, Lokio/Buffer;->write(Lokio/Buffer;J)V
|
|
|
|
return-void
|
|
|
|
.line 39
|
|
:cond_3
|
|
new-instance p0, Ljava/lang/IllegalArgumentException;
|
|
|
|
const-string p1, "Failed requirement."
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {p0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
check-cast p0, Ljava/lang/Throwable;
|
|
|
|
throw p0
|
|
.end method
|