apkfuckery/com.discord/smali_classes2/c0/z$a.smali
2020-05-11 21:22:21 +02:00

156 lines
2.9 KiB
Smali

.class public final Lc0/z$a;
.super Ljava/io/Reader;
.source "ResponseBody.kt"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lc0/z;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "a"
.end annotation
# instance fields
.field public d:Z
.field public e:Ljava/io/Reader;
.field public final f:Ld0/g;
.field public final g:Ljava/nio/charset/Charset;
# direct methods
.method public constructor <init>(Ld0/g;Ljava/nio/charset/Charset;)V
.locals 1
const/4 v0, 0x0
if-eqz p1, :cond_1
if-eqz p2, :cond_0
invoke-direct {p0}, Ljava/io/Reader;-><init>()V
iput-object p1, p0, Lc0/z$a;->f:Ld0/g;
iput-object p2, p0, Lc0/z$a;->g:Ljava/nio/charset/Charset;
return-void
:cond_0
const-string p1, "charset"
invoke-static {p1}, Ly/v/b/j;->a(Ljava/lang/String;)V
throw v0
:cond_1
const-string p1, "source"
invoke-static {p1}, Ly/v/b/j;->a(Ljava/lang/String;)V
throw v0
.end method
# virtual methods
.method public close()V
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
const/4 v0, 0x1
iput-boolean v0, p0, Lc0/z$a;->d:Z
iget-object v0, p0, Lc0/z$a;->e:Ljava/io/Reader;
if-eqz v0, :cond_0
invoke-virtual {v0}, Ljava/io/Reader;->close()V
goto :goto_0
:cond_0
iget-object v0, p0, Lc0/z$a;->f:Ld0/g;
invoke-interface {v0}, Ld0/w;->close()V
:goto_0
return-void
.end method
.method public read([CII)I
.locals 4
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
if-eqz p1, :cond_2
iget-boolean v0, p0, Lc0/z$a;->d:Z
if-nez v0, :cond_1
iget-object v0, p0, Lc0/z$a;->e:Ljava/io/Reader;
if-eqz v0, :cond_0
goto :goto_0
:cond_0
new-instance v0, Ljava/io/InputStreamReader;
iget-object v1, p0, Lc0/z$a;->f:Ld0/g;
invoke-interface {v1}, Ld0/g;->u()Ljava/io/InputStream;
move-result-object v1
iget-object v2, p0, Lc0/z$a;->f:Ld0/g;
iget-object v3, p0, Lc0/z$a;->g:Ljava/nio/charset/Charset;
invoke-static {v2, v3}, Lc0/c0/a;->a(Ld0/g;Ljava/nio/charset/Charset;)Ljava/nio/charset/Charset;
move-result-object v2
invoke-direct {v0, v1, v2}, Ljava/io/InputStreamReader;-><init>(Ljava/io/InputStream;Ljava/nio/charset/Charset;)V
iput-object v0, p0, Lc0/z$a;->e:Ljava/io/Reader;
:goto_0
invoke-virtual {v0, p1, p2, p3}, Ljava/io/Reader;->read([CII)I
move-result p1
return p1
:cond_1
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
:cond_2
const-string p1, "cbuf"
invoke-static {p1}, Ly/v/b/j;->a(Ljava/lang/String;)V
const/4 p1, 0x0
throw p1
.end method