j.smali
.class public Lcom/fulishe/fs/newvideo/cache/j;
.super Ljava/lang/Object;
.source ""
# interfaces
.implements Lcom/fulishe/fs/newvideo/cache/s;
# instance fields
.field public a:I
.field public b:Z
.field public final c:Lcom/fulishe/fs/newvideo/cache/u/c;
.field public final d:Lcom/fulishe/fs/newvideo/cache/b/b;
.field public e:Lcom/fulishe/fs/newvideo/cache/t;
.field public f:Ljava/net/HttpURLConnection;
.field public g:Ljava/io/InputStream;
# direct methods
.method public constructor <init>(Lcom/fulishe/fs/newvideo/cache/j;)V
.registers 3
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
const v0, 0x32000
iput v0, p0, Lcom/fulishe/fs/newvideo/cache/j;->a:I
const/4 v0, 0x0
iput-boolean v0, p0, Lcom/fulishe/fs/newvideo/cache/j;->b:Z
iget-object v0, p1, Lcom/fulishe/fs/newvideo/cache/j;->e:Lcom/fulishe/fs/newvideo/cache/t;
iput-object v0, p0, Lcom/fulishe/fs/newvideo/cache/j;->e:Lcom/fulishe/fs/newvideo/cache/t;
iget-object v0, p1, Lcom/fulishe/fs/newvideo/cache/j;->c:Lcom/fulishe/fs/newvideo/cache/u/c;
iput-object v0, p0, Lcom/fulishe/fs/newvideo/cache/j;->c:Lcom/fulishe/fs/newvideo/cache/u/c;
iget-object v0, p1, Lcom/fulishe/fs/newvideo/cache/j;->d:Lcom/fulishe/fs/newvideo/cache/b/b;
iput-object v0, p0, Lcom/fulishe/fs/newvideo/cache/j;->d:Lcom/fulishe/fs/newvideo/cache/b/b;
return-void
.end method
.method public constructor <init>(Ljava/lang/String;)V
.registers 3
invoke-static {}, Lcom/fulishe/fs/newvideo/cache/u/d;->a()Lcom/fulishe/fs/newvideo/cache/u/c;
move-result-object v0
invoke-direct {p0, p1, v0}, Lcom/fulishe/fs/newvideo/cache/j;-><init>(Ljava/lang/String;Lcom/fulishe/fs/newvideo/cache/u/c;)V
return-void
.end method
.method public constructor <init>(Ljava/lang/String;Lcom/fulishe/fs/newvideo/cache/u/c;)V
.registers 4
new-instance v0, Lcom/fulishe/fs/newvideo/cache/b/a;
invoke-direct {v0}, Lcom/fulishe/fs/newvideo/cache/b/a;-><init>()V
invoke-direct {p0, p1, p2, v0}, Lcom/fulishe/fs/newvideo/cache/j;-><init>(Ljava/lang/String;Lcom/fulishe/fs/newvideo/cache/u/c;Lcom/fulishe/fs/newvideo/cache/b/b;)V
return-void
.end method
.method public constructor <init>(Ljava/lang/String;Lcom/fulishe/fs/newvideo/cache/u/c;Lcom/fulishe/fs/newvideo/cache/b/b;)V
.registers 8
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
const v0, 0x32000
iput v0, p0, Lcom/fulishe/fs/newvideo/cache/j;->a:I
const/4 v0, 0x0
iput-boolean v0, p0, Lcom/fulishe/fs/newvideo/cache/j;->b:Z
invoke-static {p2}, Lcom/fulishe/fs/newvideo/cache/o;->a(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/fulishe/fs/newvideo/cache/u/c;
iput-object v0, p0, Lcom/fulishe/fs/newvideo/cache/j;->c:Lcom/fulishe/fs/newvideo/cache/u/c;
invoke-static {p3}, Lcom/fulishe/fs/newvideo/cache/o;->a(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/fulishe/fs/newvideo/cache/b/b;
iput-object v0, p0, Lcom/fulishe/fs/newvideo/cache/j;->d:Lcom/fulishe/fs/newvideo/cache/b/b;
invoke-interface {p2, p1}, Lcom/fulishe/fs/newvideo/cache/u/c;->a(Ljava/lang/String;)Lcom/fulishe/fs/newvideo/cache/t;
move-result-object v0
if-nez v0, :cond_2d
new-instance v0, Lcom/fulishe/fs/newvideo/cache/t;
invoke-static {p1}, Lcom/fulishe/fs/newvideo/cache/q;->a(Ljava/lang/String;)Ljava/lang/String;
move-result-object v1
const-wide/32 v2, -0x80000000
invoke-direct {v0, p1, v2, v3, v1}, Lcom/fulishe/fs/newvideo/cache/t;-><init>(Ljava/lang/String;JLjava/lang/String;)V
:cond_2d
iput-object v0, p0, Lcom/fulishe/fs/newvideo/cache/j;->e:Lcom/fulishe/fs/newvideo/cache/t;
return-void
.end method
.method private a(Ljava/net/HttpURLConnection;)J
.registers 4
const-string v0, "Content-Length"
invoke-virtual {p1, v0}, Ljava/net/HttpURLConnection;->getHeaderField(Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
if-nez v0, :cond_b
const-wide/16 v0, -0x1
:goto_a
return-wide v0
:cond_b
invoke-static {v0}, Ljava/lang/Long;->parseLong(Ljava/lang/String;)J
move-result-wide v0
goto :goto_a
.end method
.method private a(Ljava/net/HttpURLConnection;JI)J
.registers 9
invoke-direct {p0, p1}, Lcom/fulishe/fs/newvideo/cache/j;->a(Ljava/net/HttpURLConnection;)J
move-result-wide v0
const/16 v2, 0xc8
if-ne p4, v2, :cond_9
:goto_8
return-wide v0
:cond_9
const/16 v2, 0xce
if-ne p4, v2, :cond_f
add-long/2addr v0, p2
goto :goto_8
:cond_f
iget-object v0, p0, Lcom/fulishe/fs/newvideo/cache/j;->e:Lcom/fulishe/fs/newvideo/cache/t;
iget-wide v0, v0, Lcom/fulishe/fs/newvideo/cache/t;->b:J
goto :goto_8
.end method
.method private a(JI)Ljava/net/HttpURLConnection;
.registers 13
const/4 v2, 0x0
iget-object v0, p0, Lcom/fulishe/fs/newvideo/cache/j;->e:Lcom/fulishe/fs/newvideo/cache/t;
iget-object v0, v0, Lcom/fulishe/fs/newvideo/cache/t;->a:Ljava/lang/String;
move v1, v2
move-object v3, v0
:cond_7
invoke-static {}, Lcom/mooc/network/e/a;->a()V
const-string v4, "HttpUrlSource"
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const-string v5, "Open connection "
invoke-virtual {v0, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v5
const-wide/16 v6, 0x0
cmp-long v6, p1, v6
if-lez v6, :cond_9f
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const-string v7, " with offset "
invoke-virtual {v0, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0, p1, p2}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
:goto_30
invoke-virtual {v5, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
const-string v5, " to "
invoke-virtual {v0, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
invoke-static {v4, v0}, Lcom/fulishe/shadow/base/p;->a(Ljava/lang/String;Ljava/lang/String;)V
new-instance v0, Ljava/net/URL;
invoke-direct {v0, v3}, Ljava/net/URL;-><init>(Ljava/lang/String;)V
invoke-virtual {v0}, Ljava/net/URL;->openConnection()Ljava/net/URLConnection;
move-result-object v0
check-cast v0, Ljava/net/HttpURLConnection;
invoke-direct {p0, v0, v3}, Lcom/fulishe/fs/newvideo/cache/j;->a(Ljava/net/HttpURLConnection;Ljava/lang/String;)V
if-lez v6, :cond_73
new-instance v4, Ljava/lang/StringBuilder;
invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V
const-string v5, "bytes="
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v4
invoke-virtual {v4, p1, p2}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
move-result-object v4
const-string v5, "-"
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v4
invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v4
const-string v5, "Range"
invoke-virtual {v0, v5, v4}, Ljava/net/HttpURLConnection;->setRequestProperty(Ljava/lang/String;Ljava/lang/String;)V
:cond_73
if-lez p3, :cond_7b
invoke-virtual {v0, p3}, Ljava/net/HttpURLConnection;->setConnectTimeout(I)V
invoke-virtual {v0, p3}, Ljava/net/HttpURLConnection;->setReadTimeout(I)V
:cond_7b
invoke-virtual {v0}, Ljava/net/HttpURLConnection;->getResponseCode()I
move-result v4
const/16 v5, 0x12d
if-eq v4, v5, :cond_8b
const/16 v5, 0x12e
if-eq v4, v5, :cond_8b
const/16 v5, 0x12f
if-ne v4, v5, :cond_a2
:cond_8b
const/4 v4, 0x1
:goto_8c
if-eqz v4, :cond_99
const-string v3, "Location"
invoke-virtual {v0, v3}, Ljava/net/HttpURLConnection;->getHeaderField(Ljava/lang/String;)Ljava/lang/String;
move-result-object v3
add-int/lit8 v1, v1, 0x1
invoke-virtual {v0}, Ljava/net/HttpURLConnection;->disconnect()V
:cond_99
const/4 v5, 0x5
if-gt v1, v5, :cond_a4
if-nez v4, :cond_7
return-object v0
:cond_9f
const-string v0, ""
goto :goto_30
:cond_a2
move v4, v2
goto :goto_8c
:cond_a4
new-instance v0, Lcom/fulishe/fs/newvideo/cache/m;
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
const-string v3, "Too many redirects: "
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-direct {v0, v1}, Lcom/fulishe/fs/newvideo/cache/m;-><init>(Ljava/lang/String;)V
throw v0
.end method
.method private a(Ljava/net/HttpURLConnection;Ljava/lang/String;)V
.registers 6
iget-object v0, p0, Lcom/fulishe/fs/newvideo/cache/j;->d:Lcom/fulishe/fs/newvideo/cache/b/b;
invoke-interface {v0, p2}, Lcom/fulishe/fs/newvideo/cache/b/b;->a(Ljava/lang/String;)Ljava/util/Map;
move-result-object v0
invoke-interface {v0}, Ljava/util/Map;->entrySet()Ljava/util/Set;
move-result-object v0
invoke-interface {v0}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
move-result-object v2
:goto_e
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
move-result v0
if-eqz v0, :cond_2b
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
move-object v1, v0
check-cast v1, Ljava/util/Map$Entry;
invoke-interface {v1}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/lang/String;
invoke-interface {v1}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
move-result-object v1
check-cast v1, Ljava/lang/String;
invoke-virtual {p1, v0, v1}, Ljava/net/HttpURLConnection;->setRequestProperty(Ljava/lang/String;Ljava/lang/String;)V
goto :goto_e
:cond_2b
return-void
.end method
.method private g()V
.registers 8
const/4 v1, 0x0
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "Read content info from "
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
iget-object v2, p0, Lcom/fulishe/fs/newvideo/cache/j;->e:Lcom/fulishe/fs/newvideo/cache/t;
iget-object v2, v2, Lcom/fulishe/fs/newvideo/cache/t;->a:Ljava/lang/String;
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
const-string v2, "HttpUrlSource"
invoke-static {v2, v0}, Lcom/fulishe/shadow/base/p;->a(Ljava/lang/String;Ljava/lang/String;)V
const-wide/16 v2, 0x0
const/16 v0, 0x2710
:try_start_21
invoke-direct {p0, v2, v3, v0}, Lcom/fulishe/fs/newvideo/cache/j;->a(JI)Ljava/net/HttpURLConnection;
:try_end_24
.catch Ljava/io/IOException; {:try_start_21 .. :try_end_24} :catch_64
.catchall {:try_start_21 .. :try_end_24} :catchall_8b
move-result-object v2
:try_start_25
invoke-direct {p0, v2}, Lcom/fulishe/fs/newvideo/cache/j;->a(Ljava/net/HttpURLConnection;)J
move-result-wide v4
invoke-virtual {v2}, Ljava/net/HttpURLConnection;->getContentType()Ljava/lang/String;
move-result-object v0
invoke-virtual {v2}, Ljava/net/HttpURLConnection;->getInputStream()Ljava/io/InputStream;
move-result-object v1
new-instance v3, Lcom/fulishe/fs/newvideo/cache/t;
iget-object v6, p0, Lcom/fulishe/fs/newvideo/cache/j;->e:Lcom/fulishe/fs/newvideo/cache/t;
iget-object v6, v6, Lcom/fulishe/fs/newvideo/cache/t;->a:Ljava/lang/String;
invoke-direct {v3, v6, v4, v5, v0}, Lcom/fulishe/fs/newvideo/cache/t;-><init>(Ljava/lang/String;JLjava/lang/String;)V
iput-object v3, p0, Lcom/fulishe/fs/newvideo/cache/j;->e:Lcom/fulishe/fs/newvideo/cache/t;
iget-object v0, p0, Lcom/fulishe/fs/newvideo/cache/j;->c:Lcom/fulishe/fs/newvideo/cache/u/c;
iget-object v4, v3, Lcom/fulishe/fs/newvideo/cache/t;->a:Ljava/lang/String;
invoke-interface {v0, v4, v3}, Lcom/fulishe/fs/newvideo/cache/u/c;->a(Ljava/lang/String;Lcom/fulishe/fs/newvideo/cache/t;)V
:try_end_43
.catch Ljava/io/IOException; {:try_start_25 .. :try_end_43} :catch_96
.catchall {:try_start_25 .. :try_end_43} :catchall_98
const-string v0, "HttpUrlSource"
:try_start_45
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
const-string v4, "Source info fetched: "
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v3
iget-object v4, p0, Lcom/fulishe/fs/newvideo/cache/j;->e:Lcom/fulishe/fs/newvideo/cache/t;
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
move-result-object v3
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v3
invoke-static {v0, v3}, Lcom/fulishe/shadow/base/p;->a(Ljava/lang/String;Ljava/lang/String;)V
:try_end_5d
.catch Ljava/io/IOException; {:try_start_45 .. :try_end_5d} :catch_96
.catchall {:try_start_45 .. :try_end_5d} :catchall_98
invoke-static {v1}, Lcom/fulishe/fs/newvideo/cache/q;->a(Ljava/io/Closeable;)V
invoke-virtual {v2}, Ljava/net/HttpURLConnection;->disconnect()V
:cond_63
:goto_63
return-void
:catch_64
move-exception v0
move-object v2, v1
:goto_66
const-string v3, "HttpUrlSource"
:try_start_68
new-instance v4, Ljava/lang/StringBuilder;
invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V
const-string v5, "Error fetching info from "
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v4
iget-object v5, p0, Lcom/fulishe/fs/newvideo/cache/j;->e:Lcom/fulishe/fs/newvideo/cache/t;
iget-object v5, v5, Lcom/fulishe/fs/newvideo/cache/t;->a:Ljava/lang/String;
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v4
invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v4
invoke-static {v3, v4, v0}, Lcom/fulishe/shadow/base/p;->a(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V
:try_end_82
.catchall {:try_start_68 .. :try_end_82} :catchall_98
invoke-static {v1}, Lcom/fulishe/fs/newvideo/cache/q;->a(Ljava/io/Closeable;)V
if-eqz v2, :cond_63
invoke-virtual {v2}, Ljava/net/HttpURLConnection;->disconnect()V
goto :goto_63
:catchall_8b
move-exception v0
move-object v2, v1
:goto_8d
invoke-static {v1}, Lcom/fulishe/fs/newvideo/cache/q;->a(Ljava/io/Closeable;)V
if-eqz v2, :cond_95
invoke-virtual {v2}, Ljava/net/HttpURLConnection;->disconnect()V
:cond_95
throw v0
:catch_96
move-exception v0
goto :goto_66
:catchall_98
move-exception v0
goto :goto_8d
.end method
# virtual methods
.method public a([B)I
.registers 6
iget-object v0, p0, Lcom/fulishe/fs/newvideo/cache/j;->g:Ljava/io/InputStream;
if-eqz v0, :cond_4d
const/4 v1, 0x0
:try_start_5
array-length v2, p1
invoke-virtual {v0, p1, v1, v2}, Ljava/io/InputStream;->read([BII)I
:try_end_9
.catch Ljava/io/InterruptedIOException; {:try_start_5 .. :try_end_9} :catch_29
.catch Ljava/io/IOException; {:try_start_5 .. :try_end_9} :catch_b
move-result v0
return v0
:catch_b
move-exception v0
new-instance v1, Lcom/fulishe/fs/newvideo/cache/m;
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
const-string v3, "Error reading data from "
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
iget-object v3, p0, Lcom/fulishe/fs/newvideo/cache/j;->e:Lcom/fulishe/fs/newvideo/cache/t;
iget-object v3, v3, Lcom/fulishe/fs/newvideo/cache/t;->a:Ljava/lang/String;
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
invoke-direct {v1, v2, v0}, Lcom/fulishe/fs/newvideo/cache/m;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
throw v1
:catch_29
move-exception v0
new-instance v1, Lcom/fulishe/fs/newvideo/cache/i;
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
const-string v3, "Reading source "
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
iget-object v3, p0, Lcom/fulishe/fs/newvideo/cache/j;->e:Lcom/fulishe/fs/newvideo/cache/t;
iget-object v3, v3, Lcom/fulishe/fs/newvideo/cache/t;->a:Ljava/lang/String;
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
const-string v3, " is interrupted"
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
invoke-direct {v1, v2, v0}, Lcom/fulishe/fs/newvideo/cache/i;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
throw v1
:cond_4d
new-instance v0, Lcom/fulishe/fs/newvideo/cache/m;
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "Error reading data from "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
iget-object v2, p0, Lcom/fulishe/fs/newvideo/cache/j;->e:Lcom/fulishe/fs/newvideo/cache/t;
iget-object v2, v2, Lcom/fulishe/fs/newvideo/cache/t;->a:Ljava/lang/String;
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
const-string v2, ": connection is absent!"
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-direct {v0, v1}, Lcom/fulishe/fs/newvideo/cache/m;-><init>(Ljava/lang/String;)V
throw v0
.end method
.method public declared-synchronized a()J
.registers 5
monitor-enter p0
:try_start_1
iget-object v0, p0, Lcom/fulishe/fs/newvideo/cache/j;->e:Lcom/fulishe/fs/newvideo/cache/t;
iget-wide v0, v0, Lcom/fulishe/fs/newvideo/cache/t;->b:J
const-wide/32 v2, -0x80000000
cmp-long v0, v0, v2
if-nez v0, :cond_f
invoke-direct {p0}, Lcom/fulishe/fs/newvideo/cache/j;->g()V
:cond_f
iget-object v0, p0, Lcom/fulishe/fs/newvideo/cache/j;->e:Lcom/fulishe/fs/newvideo/cache/t;
iget-wide v0, v0, Lcom/fulishe/fs/newvideo/cache/t;->b:J
:try_end_13
.catchall {:try_start_1 .. :try_end_13} :catchall_15
monitor-exit p0
return-wide v0
:catchall_15
move-exception v0
monitor-exit p0
throw v0
.end method
.method public a(J)V
.registers 10
const/4 v0, -0x1
:try_start_1
invoke-direct {p0, p1, p2, v0}, Lcom/fulishe/fs/newvideo/cache/j;->a(JI)Ljava/net/HttpURLConnection;
move-result-object v0
iput-object v0, p0, Lcom/fulishe/fs/newvideo/cache/j;->f:Ljava/net/HttpURLConnection;
invoke-virtual {v0}, Ljava/net/HttpURLConnection;->getContentType()Ljava/lang/String;
move-result-object v0
new-instance v1, Ljava/io/BufferedInputStream;
iget-object v2, p0, Lcom/fulishe/fs/newvideo/cache/j;->f:Ljava/net/HttpURLConnection;
invoke-virtual {v2}, Ljava/net/HttpURLConnection;->getInputStream()Ljava/io/InputStream;
move-result-object v2
const/16 v3, 0x2000
invoke-direct {v1, v2, v3}, Ljava/io/BufferedInputStream;-><init>(Ljava/io/InputStream;I)V
iput-object v1, p0, Lcom/fulishe/fs/newvideo/cache/j;->g:Ljava/io/InputStream;
new-instance v1, Lcom/fulishe/fs/newvideo/cache/t;
iget-object v2, p0, Lcom/fulishe/fs/newvideo/cache/j;->e:Lcom/fulishe/fs/newvideo/cache/t;
iget-object v2, v2, Lcom/fulishe/fs/newvideo/cache/t;->a:Ljava/lang/String;
iget-object v3, p0, Lcom/fulishe/fs/newvideo/cache/j;->f:Ljava/net/HttpURLConnection;
iget-object v4, p0, Lcom/fulishe/fs/newvideo/cache/j;->f:Ljava/net/HttpURLConnection;
invoke-virtual {v4}, Ljava/net/HttpURLConnection;->getResponseCode()I
move-result v4
invoke-direct {p0, v3, p1, p2, v4}, Lcom/fulishe/fs/newvideo/cache/j;->a(Ljava/net/HttpURLConnection;JI)J
move-result-wide v4
invoke-direct {v1, v2, v4, v5, v0}, Lcom/fulishe/fs/newvideo/cache/t;-><init>(Ljava/lang/String;JLjava/lang/String;)V
iput-object v1, p0, Lcom/fulishe/fs/newvideo/cache/j;->e:Lcom/fulishe/fs/newvideo/cache/t;
iget-object v0, p0, Lcom/fulishe/fs/newvideo/cache/j;->c:Lcom/fulishe/fs/newvideo/cache/u/c;
iget-object v2, v1, Lcom/fulishe/fs/newvideo/cache/t;->a:Ljava/lang/String;
invoke-interface {v0, v2, v1}, Lcom/fulishe/fs/newvideo/cache/u/c;->a(Ljava/lang/String;Lcom/fulishe/fs/newvideo/cache/t;)V
:try_end_38
.catchall {:try_start_1 .. :try_end_38} :catchall_39
return-void
:catchall_39
move-exception v0
new-instance v1, Lcom/fulishe/fs/newvideo/cache/m;
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
const-string v3, "Error opening connection for "
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
iget-object v3, p0, Lcom/fulishe/fs/newvideo/cache/j;->e:Lcom/fulishe/fs/newvideo/cache/t;
iget-object v3, v3, Lcom/fulishe/fs/newvideo/cache/t;->a:Ljava/lang/String;
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
const-string v3, " with offset "
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2, p1, p2}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
invoke-direct {v1, v2, v0}, Lcom/fulishe/fs/newvideo/cache/m;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
throw v1
.end method
.method public a(Ljava/lang/String;I)V
.registers 8
const/4 v1, 0x0
const-string v0, "HttpUrlSource"
:try_start_3
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
const-string v3, "openPreload-start\uff01\uff01\uff01\uff01\uff01url="
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
invoke-static {v0, v2}, Lcom/fulishe/shadow/base/p;->a(Ljava/lang/String;Ljava/lang/String;)V
new-instance v0, Ljava/net/URL;
invoke-direct {v0, p1}, Ljava/net/URL;-><init>(Ljava/lang/String;)V
invoke-virtual {v0}, Ljava/net/URL;->openConnection()Ljava/net/URLConnection;
move-result-object v0
check-cast v0, Ljava/net/HttpURLConnection;
:try_end_24
.catch Ljava/lang/Exception; {:try_start_3 .. :try_end_24} :catch_5c
.catchall {:try_start_3 .. :try_end_24} :catchall_55
const/16 v1, 0xbb8
:try_start_26
invoke-virtual {v0, v1}, Ljava/net/HttpURLConnection;->setConnectTimeout(I)V
const-string v1, "GET"
invoke-virtual {v0, v1}, Ljava/net/HttpURLConnection;->setRequestMethod(Ljava/lang/String;)V
invoke-virtual {v0}, Ljava/net/HttpURLConnection;->connect()V
invoke-virtual {v0}, Ljava/net/HttpURLConnection;->getResponseCode()I
:try_end_34
.catch Ljava/lang/Exception; {:try_start_26 .. :try_end_34} :catch_66
.catchall {:try_start_26 .. :try_end_34} :catchall_61
move-result v1
const/16 v2, 0xc8
if-ne v1, v2, :cond_51
const-string v1, "HttpUrlSource"
:try_start_3b
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
const-string v3, "openPreload-success\uff01\uff01\uff01\uff01\uff01url="
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
invoke-static {v1, v2}, Lcom/fulishe/shadow/base/p;->a(Ljava/lang/String;Ljava/lang/String;)V
:try_end_51
.catch Ljava/lang/Exception; {:try_start_3b .. :try_end_51} :catch_66
.catchall {:try_start_3b .. :try_end_51} :catchall_61
:cond_51
:goto_51
invoke-virtual {v0}, Ljava/net/HttpURLConnection;->disconnect()V
:cond_54
return-void
:catchall_55
move-exception v0
:goto_56
if-eqz v1, :cond_5b
invoke-virtual {v1}, Ljava/net/HttpURLConnection;->disconnect()V
:cond_5b
throw v0
:catch_5c
move-exception v0
move-object v0, v1
:goto_5e
if-eqz v0, :cond_54
goto :goto_51
:catchall_61
move-exception v1
move-object v4, v1
move-object v1, v0
move-object v0, v4
goto :goto_56
:catch_66
move-exception v1
goto :goto_5e
.end method
.method public b()V
.registers 4
iget-object v0, p0, Lcom/fulishe/fs/newvideo/cache/j;->f:Ljava/net/HttpURLConnection;
if-eqz v0, :cond_7
:try_start_4
invoke-virtual {v0}, Ljava/net/HttpURLConnection;->disconnect()V
:try_end_7
.catch Ljava/lang/ArrayIndexOutOfBoundsException; {:try_start_4 .. :try_end_7} :catch_1a
.catch Ljava/lang/IllegalArgumentException; {:try_start_4 .. :try_end_7} :catch_11
.catch Ljava/lang/NullPointerException; {:try_start_4 .. :try_end_7} :catch_8
:cond_7
:goto_7
return-void
:catch_8
move-exception v0
new-instance v1, Ljava/lang/RuntimeException;
const-string v2, "Wait... but why? WTF!? Really shouldn\'t happen any more after fixing https://github.com/danikula/AndroidVideoCache/issues/43. If you read it on your device log, please, notify me danikula@gmail.com or create issue here https://github.com/danikula/AndroidVideoCache/issues."
invoke-direct {v1, v2, v0}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
throw v1
:catch_11
move-exception v0
new-instance v1, Ljava/lang/RuntimeException;
const-string v2, "Wait... but why? WTF!? Really shouldn\'t happen any more after fixing https://github.com/danikula/AndroidVideoCache/issues/43. If you read it on your device log, please, notify me danikula@gmail.com or create issue here https://github.com/danikula/AndroidVideoCache/issues."
invoke-direct {v1, v2, v0}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
throw v1
:catch_1a
move-exception v0
const-string v1, "HttpUrlSource"
const-string v2, "Error closing connection correctly. Should happen only on Android L. If anybody know how to fix it, please visit https://github.com/danikula/AndroidVideoCache/issues/88. Until good solution is not know, just ignore this issue :("
invoke-static {v1, v2, v0}, Lcom/fulishe/shadow/base/p;->a(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V
goto :goto_7
.end method
.method public c()I
.registers 2
iget v0, p0, Lcom/fulishe/fs/newvideo/cache/j;->a:I
return v0
.end method
.method public d()Z
.registers 2
iget-boolean v0, p0, Lcom/fulishe/fs/newvideo/cache/j;->b:Z
return v0
.end method
.method public declared-synchronized e()Ljava/lang/String;
.registers 2
monitor-enter p0
:try_start_1
iget-object v0, p0, Lcom/fulishe/fs/newvideo/cache/j;->e:Lcom/fulishe/fs/newvideo/cache/t;
iget-object v0, v0, Lcom/fulishe/fs/newvideo/cache/t;->c:Ljava/lang/String;
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v0
if-eqz v0, :cond_e
invoke-direct {p0}, Lcom/fulishe/fs/newvideo/cache/j;->g()V
:cond_e
iget-object v0, p0, Lcom/fulishe/fs/newvideo/cache/j;->e:Lcom/fulishe/fs/newvideo/cache/t;
iget-object v0, v0, Lcom/fulishe/fs/newvideo/cache/t;->c:Ljava/lang/String;
:try_end_12
.catchall {:try_start_1 .. :try_end_12} :catchall_14
monitor-exit p0
return-object v0
:catchall_14
move-exception v0
monitor-exit p0
throw v0
.end method
.method public f()Ljava/lang/String;
.registers 2
iget-object v0, p0, Lcom/fulishe/fs/newvideo/cache/j;->e:Lcom/fulishe/fs/newvideo/cache/t;
iget-object v0, v0, Lcom/fulishe/fs/newvideo/cache/t;->a:Ljava/lang/String;
return-object v0
.end method
.method public toString()Ljava/lang/String;
.registers 3
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const-string v1, "HttpUrlSource{sourceInfo=\'"
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
iget-object v1, p0, Lcom/fulishe/fs/newvideo/cache/j;->e:Lcom/fulishe/fs/newvideo/cache/t;
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
move-result-object v0
const-string v1, "}"
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
return-object v0
.end method