.class public final Lf/k/a/b/k1/e0/d; .super Ljava/lang/Object; .source "CacheDataSink.java" # interfaces .implements Lf/k/a/b/k1/j; # annotations .annotation system Ldalvik/annotation/MemberClasses; value = { Lf/k/a/b/k1/e0/d$a; } .end annotation # instance fields .field public final a:Lf/k/a/b/k1/e0/c; .field public final b:J .field public final c:I .field public d:Lf/k/a/b/k1/n; .field public e:J .field public f:Ljava/io/File; .field public g:Ljava/io/OutputStream; .field public h:J .field public i:J .field public j:Lf/k/a/b/l1/y; # direct methods .method public constructor (Lf/k/a/b/k1/e0/c;J)V .locals 5 invoke-direct {p0}, Ljava/lang/Object;->()V const-wide/16 v0, -0x1 const-wide/16 v2, 0x0 cmp-long v4, p2, v2 if-gtz v4, :cond_1 cmp-long v2, p2, v0 if-nez v2, :cond_0 goto :goto_0 :cond_0 const/4 v2, 0x0 goto :goto_1 :cond_1 :goto_0 const/4 v2, 0x1 :goto_1 const-string v3, "fragmentSize must be positive or C.LENGTH_UNSET." invoke-static {v2, v3}, Lf/k/a/b/l1/e;->d(ZLjava/lang/Object;)V cmp-long v2, p2, v0 if-eqz v2, :cond_2 const-wide/32 v0, 0x200000 cmp-long v3, p2, v0 if-gez v3, :cond_2 const-string v0, "CacheDataSink" const-string v1, "fragmentSize is below the minimum recommended value of 2097152. This may cause poor cache performance." invoke-static {v0, v1}, Lf/k/a/b/l1/o;->d(Ljava/lang/String;Ljava/lang/String;)V :cond_2 if-eqz p1, :cond_4 iput-object p1, p0, Lf/k/a/b/k1/e0/d;->a:Lf/k/a/b/k1/e0/c; if-nez v2, :cond_3 const-wide p2, 0x7fffffffffffffffL :cond_3 iput-wide p2, p0, Lf/k/a/b/k1/e0/d;->b:J const/16 p1, 0x5000 iput p1, p0, Lf/k/a/b/k1/e0/d;->c:I return-void :cond_4 new-instance p1, Ljava/lang/NullPointerException; invoke-direct {p1}, Ljava/lang/NullPointerException;->()V throw p1 .end method # virtual methods .method public final a()V .locals 4 .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/IOException; } .end annotation iget-object v0, p0, Lf/k/a/b/k1/e0/d;->g:Ljava/io/OutputStream; if-nez v0, :cond_0 return-void :cond_0 const/4 v1, 0x0 :try_start_0 invoke-virtual {v0}, Ljava/io/OutputStream;->flush()V :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 iget-object v0, p0, Lf/k/a/b/k1/e0/d;->g:Ljava/io/OutputStream; invoke-static {v0}, Lf/k/a/b/l1/f0;->a(Ljava/io/Closeable;)V iput-object v1, p0, Lf/k/a/b/k1/e0/d;->g:Ljava/io/OutputStream; iget-object v0, p0, Lf/k/a/b/k1/e0/d;->f:Ljava/io/File; iput-object v1, p0, Lf/k/a/b/k1/e0/d;->f:Ljava/io/File; iget-object v1, p0, Lf/k/a/b/k1/e0/d;->a:Lf/k/a/b/k1/e0/c; iget-wide v2, p0, Lf/k/a/b/k1/e0/d;->h:J check-cast v1, Lf/k/a/b/k1/e0/t; invoke-virtual {v1, v0, v2, v3}, Lf/k/a/b/k1/e0/t;->a(Ljava/io/File;J)V return-void :catchall_0 move-exception v0 iget-object v2, p0, Lf/k/a/b/k1/e0/d;->g:Ljava/io/OutputStream; invoke-static {v2}, Lf/k/a/b/l1/f0;->a(Ljava/io/Closeable;)V iput-object v1, p0, Lf/k/a/b/k1/e0/d;->g:Ljava/io/OutputStream; iget-object v2, p0, Lf/k/a/b/k1/e0/d;->f:Ljava/io/File; iput-object v1, p0, Lf/k/a/b/k1/e0/d;->f:Ljava/io/File; invoke-virtual {v2}, Ljava/io/File;->delete()Z throw v0 .end method .method public a(Lf/k/a/b/k1/n;)V .locals 5 .annotation system Ldalvik/annotation/Throws; value = { Lf/k/a/b/k1/e0/d$a; } .end annotation iget-wide v0, p1, Lf/k/a/b/k1/n;->g:J const-wide/16 v2, -0x1 cmp-long v4, v0, v2 if-nez v4, :cond_0 const/4 v0, 0x2 invoke-virtual {p1, v0}, Lf/k/a/b/k1/n;->a(I)Z move-result v0 if-eqz v0, :cond_0 const/4 p1, 0x0 iput-object p1, p0, Lf/k/a/b/k1/e0/d;->d:Lf/k/a/b/k1/n; return-void :cond_0 iput-object p1, p0, Lf/k/a/b/k1/e0/d;->d:Lf/k/a/b/k1/n; const/4 v0, 0x4 invoke-virtual {p1, v0}, Lf/k/a/b/k1/n;->a(I)Z move-result p1 if-eqz p1, :cond_1 iget-wide v0, p0, Lf/k/a/b/k1/e0/d;->b:J goto :goto_0 :cond_1 const-wide v0, 0x7fffffffffffffffL :goto_0 iput-wide v0, p0, Lf/k/a/b/k1/e0/d;->e:J const-wide/16 v0, 0x0 iput-wide v0, p0, Lf/k/a/b/k1/e0/d;->i:J :try_start_0 invoke-virtual {p0}, Lf/k/a/b/k1/e0/d;->b()V :try_end_0 .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0 return-void :catch_0 move-exception p1 new-instance v0, Lf/k/a/b/k1/e0/d$a; invoke-direct {v0, p1}, Lf/k/a/b/k1/e0/d$a;->(Ljava/io/IOException;)V throw v0 .end method .method public final b()V .locals 10 .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/IOException; } .end annotation iget-object v0, p0, Lf/k/a/b/k1/e0/d;->d:Lf/k/a/b/k1/n; iget-wide v0, v0, Lf/k/a/b/k1/n;->g:J const-wide/16 v2, -0x1 cmp-long v4, v0, v2 if-nez v4, :cond_0 goto :goto_0 :cond_0 iget-wide v2, p0, Lf/k/a/b/k1/e0/d;->i:J sub-long/2addr v0, v2 iget-wide v2, p0, Lf/k/a/b/k1/e0/d;->e:J invoke-static {v0, v1, v2, v3}, Ljava/lang/Math;->min(JJ)J move-result-wide v2 :goto_0 move-wide v8, v2 iget-object v0, p0, Lf/k/a/b/k1/e0/d;->a:Lf/k/a/b/k1/e0/c; iget-object v1, p0, Lf/k/a/b/k1/e0/d;->d:Lf/k/a/b/k1/n; iget-object v5, v1, Lf/k/a/b/k1/n;->h:Ljava/lang/String; iget-wide v1, v1, Lf/k/a/b/k1/n;->e:J iget-wide v3, p0, Lf/k/a/b/k1/e0/d;->i:J add-long v6, v1, v3 move-object v4, v0 check-cast v4, Lf/k/a/b/k1/e0/t; invoke-virtual/range {v4 .. v9}, Lf/k/a/b/k1/e0/t;->a(Ljava/lang/String;JJ)Ljava/io/File; move-result-object v0 iput-object v0, p0, Lf/k/a/b/k1/e0/d;->f:Ljava/io/File; new-instance v0, Ljava/io/FileOutputStream; iget-object v1, p0, Lf/k/a/b/k1/e0/d;->f:Ljava/io/File; invoke-direct {v0, v1}, Ljava/io/FileOutputStream;->(Ljava/io/File;)V iget v1, p0, Lf/k/a/b/k1/e0/d;->c:I if-lez v1, :cond_2 iget-object v2, p0, Lf/k/a/b/k1/e0/d;->j:Lf/k/a/b/l1/y; if-nez v2, :cond_1 new-instance v2, Lf/k/a/b/l1/y; invoke-direct {v2, v0, v1}, Lf/k/a/b/l1/y;->(Ljava/io/OutputStream;I)V iput-object v2, p0, Lf/k/a/b/k1/e0/d;->j:Lf/k/a/b/l1/y; goto :goto_1 :cond_1 invoke-virtual {v2, v0}, Lf/k/a/b/l1/y;->a(Ljava/io/OutputStream;)V :goto_1 iget-object v0, p0, Lf/k/a/b/k1/e0/d;->j:Lf/k/a/b/l1/y; iput-object v0, p0, Lf/k/a/b/k1/e0/d;->g:Ljava/io/OutputStream; goto :goto_2 :cond_2 iput-object v0, p0, Lf/k/a/b/k1/e0/d;->g:Ljava/io/OutputStream; :goto_2 const-wide/16 v0, 0x0 iput-wide v0, p0, Lf/k/a/b/k1/e0/d;->h:J return-void .end method