2020-05-17 12:40:10 +00:00
|
|
|
.class public final Lcom/discord/restapi/utils/CountingRequestBody$CountingSink;
|
2020-07-23 01:06:17 +00:00
|
|
|
.super Lo0/h;
|
2020-05-17 12:40:10 +00:00
|
|
|
.source "CountingRequestBody.kt"
|
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
|
|
value = Lcom/discord/restapi/utils/CountingRequestBody;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
|
|
accessFlags = 0x19
|
|
|
|
name = "CountingSink"
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
|
|
|
.field public bytesWritten:J
|
|
|
|
|
|
|
|
.field public final listener:Lkotlin/jvm/functions/Function1;
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"Lkotlin/Unit;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
2020-07-23 01:06:17 +00:00
|
|
|
.method public constructor <init>(Lo0/u;Lkotlin/jvm/functions/Function1;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
.locals 1
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
2020-07-23 01:06:17 +00:00
|
|
|
"Lo0/u;",
|
2020-05-17 12:40:10 +00:00
|
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
|
|
"-",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"Lkotlin/Unit;",
|
|
|
|
">;)V"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
invoke-direct {p0, p1}, Lo0/h;-><init>(Lo0/u;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
iput-object p2, p0, Lcom/discord/restapi/utils/CountingRequestBody$CountingSink;->listener:Lkotlin/jvm/functions/Function1;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const-string p1, "listener"
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
throw v0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
const-string p1, "delegate"
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
throw v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
2020-07-23 01:06:17 +00:00
|
|
|
.method public write(Lo0/e;J)V
|
2020-05-17 12:40:10 +00:00
|
|
|
.locals 2
|
|
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
|
|
value = {
|
|
|
|
Ljava/io/IOException;
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
invoke-super {p0, p1, p2, p3}, Lo0/h;->write(Lo0/e;J)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
iget-wide v0, p0, Lcom/discord/restapi/utils/CountingRequestBody$CountingSink;->bytesWritten:J
|
|
|
|
|
|
|
|
add-long/2addr v0, p2
|
|
|
|
|
|
|
|
iput-wide v0, p0, Lcom/discord/restapi/utils/CountingRequestBody$CountingSink;->bytesWritten:J
|
|
|
|
|
|
|
|
iget-object p1, p0, Lcom/discord/restapi/utils/CountingRequestBody$CountingSink;->listener:Lkotlin/jvm/functions/Function1;
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
invoke-interface {p1, p2}, Lkotlin/jvm/functions/Function1;->invoke(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const-string p1, "source"
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
.end method
|