apkfuckery/com.discord/smali_classes2/w/o.smali
2019-12-06 04:29:40 +01:00

201 lines
3.4 KiB
Smali

.class public final Lw/o;
.super Ljava/lang/Object;
.source "Okio.kt"
# interfaces
.implements Lw/u;
# instance fields
.field public final d:Ljava/io/OutputStream;
.field public final e:Lw/x;
# direct methods
.method public constructor <init>(Ljava/io/OutputStream;Lw/x;)V
.locals 1
const/4 v0, 0x0
if-eqz p1, :cond_1
if-eqz p2, :cond_0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Lw/o;->d:Ljava/io/OutputStream;
iput-object p2, p0, Lw/o;->e:Lw/x;
return-void
:cond_0
const-string p1, "timeout"
invoke-static {p1}, Ls/u/b/j;->a(Ljava/lang/String;)V
throw v0
:cond_1
const-string p1, "out"
invoke-static {p1}, Ls/u/b/j;->a(Ljava/lang/String;)V
throw v0
.end method
# virtual methods
.method public close()V
.locals 1
iget-object v0, p0, Lw/o;->d:Ljava/io/OutputStream;
invoke-virtual {v0}, Ljava/io/OutputStream;->close()V
return-void
.end method
.method public flush()V
.locals 1
iget-object v0, p0, Lw/o;->d:Ljava/io/OutputStream;
invoke-virtual {v0}, Ljava/io/OutputStream;->flush()V
return-void
.end method
.method public timeout()Lw/x;
.locals 1
iget-object v0, p0, Lw/o;->e:Lw/x;
return-object v0
.end method
.method public toString()Ljava/lang/String;
.locals 2
const-string v0, "sink("
invoke-static {v0}, Le/e/b/a/a;->a(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
iget-object v1, p0, Lw/o;->d:Ljava/io/OutputStream;
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
const/16 v1, 0x29
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
return-object v0
.end method
.method public write(Lw/e;J)V
.locals 7
const/4 v0, 0x0
if-eqz p1, :cond_3
iget-wide v1, p1, Lw/e;->e:J
const-wide/16 v3, 0x0
move-wide v5, p2
invoke-static/range {v1 .. v6}, Le/k/a/b/e/p/g;->a(JJJ)V
:cond_0
:goto_0
const-wide/16 v1, 0x0
cmp-long v3, p2, v1
if-lez v3, :cond_2
iget-object v1, p0, Lw/o;->e:Lw/x;
invoke-virtual {v1}, Lw/x;->e()V
iget-object v1, p1, Lw/e;->d:Lw/r;
if-eqz v1, :cond_1
iget v2, v1, Lw/r;->c:I
iget v3, v1, Lw/r;->b:I
sub-int/2addr v2, v3
int-to-long v2, v2
invoke-static {p2, p3, v2, v3}, Ljava/lang/Math;->min(JJ)J
move-result-wide v2
long-to-int v3, v2
iget-object v2, p0, Lw/o;->d:Ljava/io/OutputStream;
iget-object v4, v1, Lw/r;->a:[B
iget v5, v1, Lw/r;->b:I
invoke-virtual {v2, v4, v5, v3}, Ljava/io/OutputStream;->write([BII)V
iget v2, v1, Lw/r;->b:I
add-int/2addr v2, v3
iput v2, v1, Lw/r;->b:I
int-to-long v2, v3
sub-long/2addr p2, v2
iget-wide v4, p1, Lw/e;->e:J
sub-long/2addr v4, v2
iput-wide v4, p1, Lw/e;->e:J
iget v2, v1, Lw/r;->b:I
iget v3, v1, Lw/r;->c:I
if-ne v2, v3, :cond_0
invoke-virtual {v1}, Lw/r;->a()Lw/r;
move-result-object v2
iput-object v2, p1, Lw/e;->d:Lw/r;
invoke-static {v1}, Lw/s;->a(Lw/r;)V
goto :goto_0
:cond_1
invoke-static {}, Ls/u/b/j;->throwNpe()V
throw v0
:cond_2
return-void
:cond_3
const-string p1, "source"
invoke-static {p1}, Ls/u/b/j;->a(Ljava/lang/String;)V
throw v0
.end method