219 lines
4.3 KiB
Smali
219 lines
4.3 KiB
Smali
.class public Lzf/h;
|
|
.super Lzf/a;
|
|
.source "FileEntity.java"
|
|
|
|
# interfaces
|
|
.implements Ljava/lang/Cloneable;
|
|
|
|
|
|
# annotations
|
|
.annotation build Lcz/msebera/android/httpclient/annotation/NotThreadSafe;
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public final e:Ljava/io/File;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Ljava/io/File;)V
|
|
.locals 1
|
|
|
|
.line 7
|
|
invoke-direct {p0}, Lzf/a;-><init>()V
|
|
|
|
const-string v0, "File"
|
|
|
|
.line 8
|
|
invoke-static {p1, v0}, Lqg/a;->h(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Ljava/io/File;
|
|
|
|
iput-object p1, p0, Lzf/h;->e:Ljava/io/File;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Ljava/io/File;Lcz/msebera/android/httpclient/entity/ContentType;)V
|
|
.locals 1
|
|
|
|
.line 4
|
|
invoke-direct {p0}, Lzf/a;-><init>()V
|
|
|
|
const-string v0, "File"
|
|
|
|
.line 5
|
|
invoke-static {p1, v0}, Lqg/a;->h(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Ljava/io/File;
|
|
|
|
iput-object p1, p0, Lzf/h;->e:Ljava/io/File;
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
.line 6
|
|
invoke-virtual {p2}, Lcz/msebera/android/httpclient/entity/ContentType;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p0, p1}, Lzf/a;->e(Ljava/lang/String;)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Ljava/io/File;Ljava/lang/String;)V
|
|
.locals 1
|
|
.annotation runtime Ljava/lang/Deprecated;
|
|
.end annotation
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Lzf/a;-><init>()V
|
|
|
|
const-string v0, "File"
|
|
|
|
.line 2
|
|
invoke-static {p1, v0}, Lqg/a;->h(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Ljava/io/File;
|
|
|
|
iput-object p1, p0, Lzf/h;->e:Ljava/io/File;
|
|
|
|
.line 3
|
|
invoke-virtual {p0, p2}, Lzf/a;->e(Ljava/lang/String;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public clone()Ljava/lang/Object;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/lang/CloneNotSupportedException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
invoke-super {p0}, Ljava/lang/Object;->clone()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getContent()Ljava/io/InputStream;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
new-instance v0, Ljava/io/FileInputStream;
|
|
|
|
iget-object v1, p0, Lzf/h;->e:Ljava/io/File;
|
|
|
|
invoke-direct {v0, v1}, Ljava/io/FileInputStream;-><init>(Ljava/io/File;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getContentLength()J
|
|
.locals 2
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lzf/h;->e:Ljava/io/File;
|
|
|
|
invoke-virtual {v0}, Ljava/io/File;->length()J
|
|
|
|
move-result-wide v0
|
|
|
|
return-wide v0
|
|
.end method
|
|
|
|
.method public isRepeatable()Z
|
|
.locals 1
|
|
|
|
const/4 v0, 0x1
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public isStreaming()Z
|
|
.locals 1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public writeTo(Ljava/io/OutputStream;)V
|
|
.locals 4
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "Output stream"
|
|
|
|
.line 1
|
|
invoke-static {p1, v0}, Lqg/a;->h(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
.line 2
|
|
new-instance v0, Ljava/io/FileInputStream;
|
|
|
|
iget-object v1, p0, Lzf/h;->e:Ljava/io/File;
|
|
|
|
invoke-direct {v0, v1}, Ljava/io/FileInputStream;-><init>(Ljava/io/File;)V
|
|
|
|
const/16 v1, 0x1000
|
|
|
|
:try_start_0
|
|
new-array v1, v1, [B
|
|
|
|
.line 3
|
|
:goto_0
|
|
invoke-virtual {v0, v1}, Ljava/io/InputStream;->read([B)I
|
|
|
|
move-result v2
|
|
|
|
const/4 v3, -0x1
|
|
|
|
if-eq v2, v3, :cond_0
|
|
|
|
const/4 v3, 0x0
|
|
|
|
.line 4
|
|
invoke-virtual {p1, v1, v3, v2}, Ljava/io/OutputStream;->write([BII)V
|
|
|
|
goto :goto_0
|
|
|
|
.line 5
|
|
:cond_0
|
|
invoke-virtual {p1}, Ljava/io/OutputStream;->flush()V
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
.line 6
|
|
invoke-virtual {v0}, Ljava/io/InputStream;->close()V
|
|
|
|
return-void
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
invoke-virtual {v0}, Ljava/io/InputStream;->close()V
|
|
|
|
throw p1
|
|
.end method
|