.class public final Lcom/discord/restapi/utils/CountingRequestBody$CountingSink; .super Lc0/h; .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 .method public constructor (Lc0/u;Lkotlin/jvm/functions/Function1;)V .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "(", "Lc0/u;", "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 invoke-direct {p0, p1}, Lc0/h;->(Lc0/u;)V iput-object p2, p0, Lcom/discord/restapi/utils/CountingRequestBody$CountingSink;->listener:Lkotlin/jvm/functions/Function1; return-void :cond_0 const-string p1, "listener" invoke-static {p1}, Lx/u/b/j;->a(Ljava/lang/String;)V throw v0 :cond_1 const-string p1, "delegate" invoke-static {p1}, Lx/u/b/j;->a(Ljava/lang/String;)V throw v0 .end method # virtual methods .method public write(Lc0/e;J)V .locals 2 .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/IOException; } .end annotation if-eqz p1, :cond_0 invoke-super {p0, p1, p2, p3}, Lc0/h;->write(Lc0/e;J)V 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; iget-wide p2, p0, Lcom/discord/restapi/utils/CountingRequestBody$CountingSink;->bytesWritten:J invoke-static {p2, p3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long; 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" invoke-static {p1}, Lx/u/b/j;->a(Ljava/lang/String;)V const/4 p1, 0x0 throw p1 .end method