.class public final Lokhttp3/internal/cache/CacheInterceptor$cacheWritingResponse$cacheWritingSource$1; .super Ljava/lang/Object; .source "CacheInterceptor.kt" # interfaces .implements Lokio/Source; # annotations .annotation system Ldalvik/annotation/EnclosingMethod; value = Lokhttp3/internal/cache/CacheInterceptor;->cacheWritingResponse(Lokhttp3/internal/cache/CacheRequest;Lokhttp3/Response;)Lokhttp3/Response; .end annotation .annotation system Ldalvik/annotation/InnerClass; accessFlags = 0x19 name = null .end annotation .annotation runtime Lkotlin/Metadata; bv = { 0x1, 0x0, 0x3 } d1 = { "\u0000+\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\t\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0018\u0002\n\u0000*\u0001\u0000\u0008\n\u0018\u00002\u00020\u0001J\u0008\u0010\u0004\u001a\u00020\u0005H\u0016J\u0018\u0010\u0006\u001a\u00020\u00072\u0006\u0010\u0008\u001a\u00020\t2\u0006\u0010\n\u001a\u00020\u0007H\u0016J\u0008\u0010\u000b\u001a\u00020\u000cH\u0016R\u000e\u0010\u0002\u001a\u00020\u0003X\u0082\u000e\u00a2\u0006\u0002\n\u0000\u00a8\u0006\r" } d2 = { "okhttp3/internal/cache/CacheInterceptor$cacheWritingResponse$cacheWritingSource$1", "Lokio/Source;", "cacheRequestClosed", "", "close", "", "read", "", "sink", "Lokio/Buffer;", "byteCount", "timeout", "Lokio/Timeout;", "okhttp" } k = 0x1 mv = { 0x1, 0x4, 0x0 } .end annotation # instance fields .field final synthetic $cacheBody:Lokio/BufferedSink; .field final synthetic $cacheRequest:Lokhttp3/internal/cache/CacheRequest; .field final synthetic $source:Lokio/BufferedSource; .field private cacheRequestClosed:Z # direct methods .method constructor (Lokio/BufferedSource;Lokhttp3/internal/cache/CacheRequest;Lokio/BufferedSink;)V .locals 0 iput-object p1, p0, Lokhttp3/internal/cache/CacheInterceptor$cacheWritingResponse$cacheWritingSource$1;->$source:Lokio/BufferedSource; iput-object p2, p0, Lokhttp3/internal/cache/CacheInterceptor$cacheWritingResponse$cacheWritingSource$1;->$cacheRequest:Lokhttp3/internal/cache/CacheRequest; iput-object p3, p0, Lokhttp3/internal/cache/CacheInterceptor$cacheWritingResponse$cacheWritingSource$1;->$cacheBody:Lokio/BufferedSink; .line 171 invoke-direct {p0}, Ljava/lang/Object;->()V return-void .end method # virtual methods .method public close()V .locals 2 .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/IOException; } .end annotation iget-boolean v0, p0, Lokhttp3/internal/cache/CacheInterceptor$cacheWritingResponse$cacheWritingSource$1;->cacheRequestClosed:Z if-nez v0, :cond_0 const/16 v0, 0x64 .line 205 sget-object v1, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit; invoke-static {p0, v0, v1}, Lokhttp3/internal/Util;->discard(Lokio/Source;ILjava/util/concurrent/TimeUnit;)Z move-result v0 if-nez v0, :cond_0 const/4 v0, 0x1 iput-boolean v0, p0, Lokhttp3/internal/cache/CacheInterceptor$cacheWritingResponse$cacheWritingSource$1;->cacheRequestClosed:Z iget-object v0, p0, Lokhttp3/internal/cache/CacheInterceptor$cacheWritingResponse$cacheWritingSource$1;->$cacheRequest:Lokhttp3/internal/cache/CacheRequest; .line 207 invoke-interface {v0}, Lokhttp3/internal/cache/CacheRequest;->abort()V :cond_0 iget-object p0, p0, Lokhttp3/internal/cache/CacheInterceptor$cacheWritingResponse$cacheWritingSource$1;->$source:Lokio/BufferedSource; .line 209 invoke-interface {p0}, Lokio/BufferedSource;->close()V return-void .end method .method public read(Lokio/Buffer;J)J .locals 8 .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/IOException; } .end annotation const-string v0, "sink" invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V const/4 v0, 0x1 :try_start_0 iget-object v1, p0, Lokhttp3/internal/cache/CacheInterceptor$cacheWritingResponse$cacheWritingSource$1;->$source:Lokio/BufferedSource; .line 178 invoke-interface {v1, p1, p2, p3}, Lokio/BufferedSource;->read(Lokio/Buffer;J)J move-result-wide p2 :try_end_0 .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0 const-wide/16 v1, -0x1 cmp-long v3, p2, v1 if-nez v3, :cond_1 iget-boolean p1, p0, Lokhttp3/internal/cache/CacheInterceptor$cacheWritingResponse$cacheWritingSource$1;->cacheRequestClosed:Z if-nez p1, :cond_0 iput-boolean v0, p0, Lokhttp3/internal/cache/CacheInterceptor$cacheWritingResponse$cacheWritingSource$1;->cacheRequestClosed:Z iget-object p0, p0, Lokhttp3/internal/cache/CacheInterceptor$cacheWritingResponse$cacheWritingSource$1;->$cacheBody:Lokio/BufferedSink; .line 190 invoke-interface {p0}, Lokio/BufferedSink;->close()V :cond_0 return-wide v1 :cond_1 iget-object v0, p0, Lokhttp3/internal/cache/CacheInterceptor$cacheWritingResponse$cacheWritingSource$1;->$cacheBody:Lokio/BufferedSink; .line 195 invoke-interface {v0}, Lokio/BufferedSink;->getBuffer()Lokio/Buffer; move-result-object v3 invoke-virtual {p1}, Lokio/Buffer;->size()J move-result-wide v0 sub-long v4, v0, p2 move-object v2, p1 move-wide v6, p2 invoke-virtual/range {v2 .. v7}, Lokio/Buffer;->copyTo(Lokio/Buffer;JJ)Lokio/Buffer; iget-object p0, p0, Lokhttp3/internal/cache/CacheInterceptor$cacheWritingResponse$cacheWritingSource$1;->$cacheBody:Lokio/BufferedSink; .line 196 invoke-interface {p0}, Lokio/BufferedSink;->emitCompleteSegments()Lokio/BufferedSink; return-wide p2 :catch_0 move-exception p1 iget-boolean p2, p0, Lokhttp3/internal/cache/CacheInterceptor$cacheWritingResponse$cacheWritingSource$1;->cacheRequestClosed:Z if-nez p2, :cond_2 iput-boolean v0, p0, Lokhttp3/internal/cache/CacheInterceptor$cacheWritingResponse$cacheWritingSource$1;->cacheRequestClosed:Z iget-object p0, p0, Lokhttp3/internal/cache/CacheInterceptor$cacheWritingResponse$cacheWritingSource$1;->$cacheRequest:Lokhttp3/internal/cache/CacheRequest; .line 182 invoke-interface {p0}, Lokhttp3/internal/cache/CacheRequest;->abort()V .line 184 :cond_2 check-cast p1, Ljava/lang/Throwable; throw p1 .end method .method public timeout()Lokio/Timeout; .locals 0 iget-object p0, p0, Lokhttp3/internal/cache/CacheInterceptor$cacheWritingResponse$cacheWritingSource$1;->$source:Lokio/BufferedSource; .line 200 invoke-interface {p0}, Lokio/BufferedSource;->timeout()Lokio/Timeout; move-result-object p0 return-object p0 .end method