2020-05-11 19:22:21 +00:00
|
|
|
.class public final Lf/k/a/b/k1/e0/d;
|
2020-04-17 17:35:24 +00:00
|
|
|
.super Ljava/lang/Object;
|
|
|
|
.source "CacheDataSink.java"
|
|
|
|
|
|
|
|
# interfaces
|
2020-05-11 19:22:21 +00:00
|
|
|
.implements Lf/k/a/b/k1/j;
|
2020-04-17 17:35:24 +00:00
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
|
|
value = {
|
2020-05-11 19:22:21 +00:00
|
|
|
Lf/k/a/b/k1/e0/d$a;
|
2020-04-17 17:35:24 +00:00
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
2020-05-11 19:22:21 +00:00
|
|
|
.field public final a:Lf/k/a/b/k1/e0/c;
|
2020-04-17 17:35:24 +00:00
|
|
|
|
|
|
|
.field public final b:J
|
|
|
|
|
|
|
|
.field public final c:I
|
|
|
|
|
2020-05-11 19:22:21 +00:00
|
|
|
.field public d:Lf/k/a/b/k1/n;
|
2020-04-17 17:35:24 +00:00
|
|
|
|
|
|
|
.field public e:J
|
|
|
|
|
|
|
|
.field public f:Ljava/io/File;
|
|
|
|
|
|
|
|
.field public g:Ljava/io/OutputStream;
|
|
|
|
|
|
|
|
.field public h:J
|
|
|
|
|
|
|
|
.field public i:J
|
|
|
|
|
2020-05-11 19:22:21 +00:00
|
|
|
.field public j:Lf/k/a/b/l1/y;
|
2020-04-17 17:35:24 +00:00
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
2020-05-11 19:22:21 +00:00
|
|
|
.method public constructor <init>(Lf/k/a/b/k1/e0/c;J)V
|
2020-04-17 17:35:24 +00:00
|
|
|
.locals 5
|
|
|
|
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()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."
|
|
|
|
|
2020-05-11 19:22:21 +00:00
|
|
|
invoke-static {v2, v3}, Lf/k/a/b/l1/e;->d(ZLjava/lang/Object;)V
|
2020-04-17 17:35:24 +00:00
|
|
|
|
|
|
|
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."
|
|
|
|
|
2020-05-11 19:22:21 +00:00
|
|
|
invoke-static {v0, v1}, Lf/k/a/b/l1/o;->d(Ljava/lang/String;Ljava/lang/String;)V
|
2020-04-17 17:35:24 +00:00
|
|
|
|
|
|
|
:cond_2
|
|
|
|
if-eqz p1, :cond_4
|
|
|
|
|
2020-05-11 19:22:21 +00:00
|
|
|
iput-object p1, p0, Lf/k/a/b/k1/e0/d;->a:Lf/k/a/b/k1/e0/c;
|
2020-04-17 17:35:24 +00:00
|
|
|
|
|
|
|
if-nez v2, :cond_3
|
|
|
|
|
|
|
|
const-wide p2, 0x7fffffffffffffffL
|
|
|
|
|
|
|
|
:cond_3
|
2020-05-11 19:22:21 +00:00
|
|
|
iput-wide p2, p0, Lf/k/a/b/k1/e0/d;->b:J
|
2020-04-17 17:35:24 +00:00
|
|
|
|
|
|
|
const/16 p1, 0x5000
|
|
|
|
|
2020-05-11 19:22:21 +00:00
|
|
|
iput p1, p0, Lf/k/a/b/k1/e0/d;->c:I
|
2020-04-17 17:35:24 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_4
|
|
|
|
new-instance p1, Ljava/lang/NullPointerException;
|
|
|
|
|
|
|
|
invoke-direct {p1}, Ljava/lang/NullPointerException;-><init>()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
|
|
|
|
|
2020-05-11 19:22:21 +00:00
|
|
|
iget-object v0, p0, Lf/k/a/b/k1/e0/d;->g:Ljava/io/OutputStream;
|
2020-04-17 17:35:24 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2020-05-11 19:22:21 +00:00
|
|
|
iget-object v0, p0, Lf/k/a/b/k1/e0/d;->g:Ljava/io/OutputStream;
|
2020-04-17 17:35:24 +00:00
|
|
|
|
2020-05-11 19:22:21 +00:00
|
|
|
invoke-static {v0}, Lf/k/a/b/l1/f0;->a(Ljava/io/Closeable;)V
|
2020-04-17 17:35:24 +00:00
|
|
|
|
2020-05-11 19:22:21 +00:00
|
|
|
iput-object v1, p0, Lf/k/a/b/k1/e0/d;->g:Ljava/io/OutputStream;
|
2020-04-17 17:35:24 +00:00
|
|
|
|
2020-05-11 19:22:21 +00:00
|
|
|
iget-object v0, p0, Lf/k/a/b/k1/e0/d;->f:Ljava/io/File;
|
2020-04-17 17:35:24 +00:00
|
|
|
|
2020-05-11 19:22:21 +00:00
|
|
|
iput-object v1, p0, Lf/k/a/b/k1/e0/d;->f:Ljava/io/File;
|
2020-04-17 17:35:24 +00:00
|
|
|
|
2020-05-11 19:22:21 +00:00
|
|
|
iget-object v1, p0, Lf/k/a/b/k1/e0/d;->a:Lf/k/a/b/k1/e0/c;
|
2020-04-17 17:35:24 +00:00
|
|
|
|
2020-05-11 19:22:21 +00:00
|
|
|
iget-wide v2, p0, Lf/k/a/b/k1/e0/d;->h:J
|
2020-04-17 17:35:24 +00:00
|
|
|
|
2020-05-11 19:22:21 +00:00
|
|
|
check-cast v1, Lf/k/a/b/k1/e0/t;
|
2020-04-17 17:35:24 +00:00
|
|
|
|
2020-05-11 19:22:21 +00:00
|
|
|
invoke-virtual {v1, v0, v2, v3}, Lf/k/a/b/k1/e0/t;->a(Ljava/io/File;J)V
|
2020-04-17 17:35:24 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:catchall_0
|
|
|
|
move-exception v0
|
|
|
|
|
2020-05-11 19:22:21 +00:00
|
|
|
iget-object v2, p0, Lf/k/a/b/k1/e0/d;->g:Ljava/io/OutputStream;
|
2020-04-17 17:35:24 +00:00
|
|
|
|
2020-05-11 19:22:21 +00:00
|
|
|
invoke-static {v2}, Lf/k/a/b/l1/f0;->a(Ljava/io/Closeable;)V
|
2020-04-17 17:35:24 +00:00
|
|
|
|
2020-05-11 19:22:21 +00:00
|
|
|
iput-object v1, p0, Lf/k/a/b/k1/e0/d;->g:Ljava/io/OutputStream;
|
2020-04-17 17:35:24 +00:00
|
|
|
|
2020-05-11 19:22:21 +00:00
|
|
|
iget-object v2, p0, Lf/k/a/b/k1/e0/d;->f:Ljava/io/File;
|
2020-04-17 17:35:24 +00:00
|
|
|
|
2020-05-11 19:22:21 +00:00
|
|
|
iput-object v1, p0, Lf/k/a/b/k1/e0/d;->f:Ljava/io/File;
|
2020-04-17 17:35:24 +00:00
|
|
|
|
|
|
|
invoke-virtual {v2}, Ljava/io/File;->delete()Z
|
|
|
|
|
|
|
|
throw v0
|
|
|
|
.end method
|
|
|
|
|
2020-05-11 19:22:21 +00:00
|
|
|
.method public a(Lf/k/a/b/k1/n;)V
|
2020-04-17 17:35:24 +00:00
|
|
|
.locals 5
|
|
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
|
|
value = {
|
2020-05-11 19:22:21 +00:00
|
|
|
Lf/k/a/b/k1/e0/d$a;
|
2020-04-17 17:35:24 +00:00
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
2020-05-11 19:22:21 +00:00
|
|
|
iget-wide v0, p1, Lf/k/a/b/k1/n;->g:J
|
2020-04-17 17:35:24 +00:00
|
|
|
|
|
|
|
const-wide/16 v2, -0x1
|
|
|
|
|
|
|
|
cmp-long v4, v0, v2
|
|
|
|
|
|
|
|
if-nez v4, :cond_0
|
|
|
|
|
|
|
|
const/4 v0, 0x2
|
|
|
|
|
2020-05-11 19:22:21 +00:00
|
|
|
invoke-virtual {p1, v0}, Lf/k/a/b/k1/n;->a(I)Z
|
2020-04-17 17:35:24 +00:00
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
2020-05-11 19:22:21 +00:00
|
|
|
iput-object p1, p0, Lf/k/a/b/k1/e0/d;->d:Lf/k/a/b/k1/n;
|
2020-04-17 17:35:24 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_0
|
2020-05-11 19:22:21 +00:00
|
|
|
iput-object p1, p0, Lf/k/a/b/k1/e0/d;->d:Lf/k/a/b/k1/n;
|
2020-04-17 17:35:24 +00:00
|
|
|
|
|
|
|
const/4 v0, 0x4
|
|
|
|
|
2020-05-11 19:22:21 +00:00
|
|
|
invoke-virtual {p1, v0}, Lf/k/a/b/k1/n;->a(I)Z
|
2020-04-17 17:35:24 +00:00
|
|
|
|
|
|
|
move-result p1
|
|
|
|
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
|
2020-05-11 19:22:21 +00:00
|
|
|
iget-wide v0, p0, Lf/k/a/b/k1/e0/d;->b:J
|
2020-04-17 17:35:24 +00:00
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
const-wide v0, 0x7fffffffffffffffL
|
|
|
|
|
|
|
|
:goto_0
|
2020-05-11 19:22:21 +00:00
|
|
|
iput-wide v0, p0, Lf/k/a/b/k1/e0/d;->e:J
|
2020-04-17 17:35:24 +00:00
|
|
|
|
|
|
|
const-wide/16 v0, 0x0
|
|
|
|
|
2020-05-11 19:22:21 +00:00
|
|
|
iput-wide v0, p0, Lf/k/a/b/k1/e0/d;->i:J
|
2020-04-17 17:35:24 +00:00
|
|
|
|
|
|
|
:try_start_0
|
2020-05-11 19:22:21 +00:00
|
|
|
invoke-virtual {p0}, Lf/k/a/b/k1/e0/d;->b()V
|
2020-04-17 17:35:24 +00:00
|
|
|
:try_end_0
|
|
|
|
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:catch_0
|
|
|
|
move-exception p1
|
|
|
|
|
2020-05-11 19:22:21 +00:00
|
|
|
new-instance v0, Lf/k/a/b/k1/e0/d$a;
|
2020-04-17 17:35:24 +00:00
|
|
|
|
2020-05-11 19:22:21 +00:00
|
|
|
invoke-direct {v0, p1}, Lf/k/a/b/k1/e0/d$a;-><init>(Ljava/io/IOException;)V
|
2020-04-17 17:35:24 +00:00
|
|
|
|
|
|
|
throw v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final b()V
|
|
|
|
.locals 10
|
|
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
|
|
value = {
|
|
|
|
Ljava/io/IOException;
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
2020-05-11 19:22:21 +00:00
|
|
|
iget-object v0, p0, Lf/k/a/b/k1/e0/d;->d:Lf/k/a/b/k1/n;
|
2020-04-17 17:35:24 +00:00
|
|
|
|
2020-05-11 19:22:21 +00:00
|
|
|
iget-wide v0, v0, Lf/k/a/b/k1/n;->g:J
|
2020-04-17 17:35:24 +00:00
|
|
|
|
|
|
|
const-wide/16 v2, -0x1
|
|
|
|
|
|
|
|
cmp-long v4, v0, v2
|
|
|
|
|
|
|
|
if-nez v4, :cond_0
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
2020-05-11 19:22:21 +00:00
|
|
|
iget-wide v2, p0, Lf/k/a/b/k1/e0/d;->i:J
|
2020-04-17 17:35:24 +00:00
|
|
|
|
|
|
|
sub-long/2addr v0, v2
|
|
|
|
|
2020-05-11 19:22:21 +00:00
|
|
|
iget-wide v2, p0, Lf/k/a/b/k1/e0/d;->e:J
|
2020-04-17 17:35:24 +00:00
|
|
|
|
|
|
|
invoke-static {v0, v1, v2, v3}, Ljava/lang/Math;->min(JJ)J
|
|
|
|
|
|
|
|
move-result-wide v2
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
move-wide v8, v2
|
|
|
|
|
2020-05-11 19:22:21 +00:00
|
|
|
iget-object v0, p0, Lf/k/a/b/k1/e0/d;->a:Lf/k/a/b/k1/e0/c;
|
2020-04-17 17:35:24 +00:00
|
|
|
|
2020-05-11 19:22:21 +00:00
|
|
|
iget-object v1, p0, Lf/k/a/b/k1/e0/d;->d:Lf/k/a/b/k1/n;
|
2020-04-17 17:35:24 +00:00
|
|
|
|
2020-05-11 19:22:21 +00:00
|
|
|
iget-object v5, v1, Lf/k/a/b/k1/n;->h:Ljava/lang/String;
|
2020-04-17 17:35:24 +00:00
|
|
|
|
2020-05-11 19:22:21 +00:00
|
|
|
iget-wide v1, v1, Lf/k/a/b/k1/n;->e:J
|
2020-04-17 17:35:24 +00:00
|
|
|
|
2020-05-11 19:22:21 +00:00
|
|
|
iget-wide v3, p0, Lf/k/a/b/k1/e0/d;->i:J
|
2020-04-17 17:35:24 +00:00
|
|
|
|
|
|
|
add-long v6, v1, v3
|
|
|
|
|
|
|
|
move-object v4, v0
|
|
|
|
|
2020-05-11 19:22:21 +00:00
|
|
|
check-cast v4, Lf/k/a/b/k1/e0/t;
|
2020-04-17 17:35:24 +00:00
|
|
|
|
2020-05-11 19:22:21 +00:00
|
|
|
invoke-virtual/range {v4 .. v9}, Lf/k/a/b/k1/e0/t;->a(Ljava/lang/String;JJ)Ljava/io/File;
|
2020-04-17 17:35:24 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2020-05-11 19:22:21 +00:00
|
|
|
iput-object v0, p0, Lf/k/a/b/k1/e0/d;->f:Ljava/io/File;
|
2020-04-17 17:35:24 +00:00
|
|
|
|
|
|
|
new-instance v0, Ljava/io/FileOutputStream;
|
|
|
|
|
2020-05-11 19:22:21 +00:00
|
|
|
iget-object v1, p0, Lf/k/a/b/k1/e0/d;->f:Ljava/io/File;
|
2020-04-17 17:35:24 +00:00
|
|
|
|
|
|
|
invoke-direct {v0, v1}, Ljava/io/FileOutputStream;-><init>(Ljava/io/File;)V
|
|
|
|
|
2020-05-11 19:22:21 +00:00
|
|
|
iget v1, p0, Lf/k/a/b/k1/e0/d;->c:I
|
2020-04-17 17:35:24 +00:00
|
|
|
|
|
|
|
if-lez v1, :cond_2
|
|
|
|
|
2020-05-11 19:22:21 +00:00
|
|
|
iget-object v2, p0, Lf/k/a/b/k1/e0/d;->j:Lf/k/a/b/l1/y;
|
2020-04-17 17:35:24 +00:00
|
|
|
|
|
|
|
if-nez v2, :cond_1
|
|
|
|
|
2020-05-11 19:22:21 +00:00
|
|
|
new-instance v2, Lf/k/a/b/l1/y;
|
2020-04-17 17:35:24 +00:00
|
|
|
|
2020-05-11 19:22:21 +00:00
|
|
|
invoke-direct {v2, v0, v1}, Lf/k/a/b/l1/y;-><init>(Ljava/io/OutputStream;I)V
|
2020-04-17 17:35:24 +00:00
|
|
|
|
2020-05-11 19:22:21 +00:00
|
|
|
iput-object v2, p0, Lf/k/a/b/k1/e0/d;->j:Lf/k/a/b/l1/y;
|
2020-04-17 17:35:24 +00:00
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_1
|
2020-05-11 19:22:21 +00:00
|
|
|
invoke-virtual {v2, v0}, Lf/k/a/b/l1/y;->a(Ljava/io/OutputStream;)V
|
2020-04-17 17:35:24 +00:00
|
|
|
|
|
|
|
:goto_1
|
2020-05-11 19:22:21 +00:00
|
|
|
iget-object v0, p0, Lf/k/a/b/k1/e0/d;->j:Lf/k/a/b/l1/y;
|
2020-04-17 17:35:24 +00:00
|
|
|
|
2020-05-11 19:22:21 +00:00
|
|
|
iput-object v0, p0, Lf/k/a/b/k1/e0/d;->g:Ljava/io/OutputStream;
|
2020-04-17 17:35:24 +00:00
|
|
|
|
|
|
|
goto :goto_2
|
|
|
|
|
|
|
|
:cond_2
|
2020-05-11 19:22:21 +00:00
|
|
|
iput-object v0, p0, Lf/k/a/b/k1/e0/d;->g:Ljava/io/OutputStream;
|
2020-04-17 17:35:24 +00:00
|
|
|
|
|
|
|
:goto_2
|
|
|
|
const-wide/16 v0, 0x0
|
|
|
|
|
2020-05-11 19:22:21 +00:00
|
|
|
iput-wide v0, p0, Lf/k/a/b/k1/e0/d;->h:J
|
2020-04-17 17:35:24 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|