231 lines
5.3 KiB
Smali
231 lines
5.3 KiB
Smali
.class public Lbg/e;
|
|
.super Lbg/a;
|
|
.source "FileBody.java"
|
|
|
|
|
|
# instance fields
|
|
.field public final b:Ljava/io/File;
|
|
|
|
.field public final c:Ljava/lang/String;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Ljava/io/File;)V
|
|
.locals 2
|
|
|
|
.line 4
|
|
sget-object v0, Lcz/msebera/android/httpclient/entity/ContentType;->DEFAULT_BINARY:Lcz/msebera/android/httpclient/entity/ContentType;
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-virtual {p1}, Ljava/io/File;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v1, 0x0
|
|
|
|
:goto_0
|
|
invoke-direct {p0, p1, v0, v1}, Lbg/e;-><init>(Ljava/io/File;Lcz/msebera/android/httpclient/entity/ContentType;Ljava/lang/String;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Ljava/io/File;Lcz/msebera/android/httpclient/entity/ContentType;)V
|
|
.locals 1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 9
|
|
invoke-direct {p0, p1, p2, v0}, Lbg/e;-><init>(Ljava/io/File;Lcz/msebera/android/httpclient/entity/ContentType;Ljava/lang/String;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Ljava/io/File;Lcz/msebera/android/httpclient/entity/ContentType;Ljava/lang/String;)V
|
|
.locals 0
|
|
|
|
.line 5
|
|
invoke-direct {p0, p2}, Lbg/a;-><init>(Lcz/msebera/android/httpclient/entity/ContentType;)V
|
|
|
|
const-string p2, "File"
|
|
|
|
.line 6
|
|
invoke-static {p1, p2}, Lqg/a;->h(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
.line 7
|
|
iput-object p1, p0, Lbg/e;->b:Ljava/io/File;
|
|
|
|
.line 8
|
|
iput-object p3, p0, Lbg/e;->c:Ljava/lang/String;
|
|
|
|
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 3
|
|
invoke-static {p2}, Lcz/msebera/android/httpclient/entity/ContentType;->create(Ljava/lang/String;)Lcz/msebera/android/httpclient/entity/ContentType;
|
|
|
|
move-result-object p2
|
|
|
|
const/4 v0, 0x0
|
|
|
|
invoke-direct {p0, p1, p2, v0}, Lbg/e;-><init>(Ljava/io/File;Lcz/msebera/android/httpclient/entity/ContentType;Ljava/lang/String;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Ljava/io/File;Ljava/lang/String;Ljava/lang/String;)V
|
|
.locals 1
|
|
.annotation runtime Ljava/lang/Deprecated;
|
|
.end annotation
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 2
|
|
invoke-direct {p0, p1, v0, p2, p3}, Lbg/e;-><init>(Ljava/io/File;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Ljava/io/File;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
|
|
.locals 0
|
|
.annotation runtime Ljava/lang/Deprecated;
|
|
.end annotation
|
|
|
|
.line 1
|
|
invoke-static {p3, p4}, Lcz/msebera/android/httpclient/entity/ContentType;->create(Ljava/lang/String;Ljava/lang/String;)Lcz/msebera/android/httpclient/entity/ContentType;
|
|
|
|
move-result-object p3
|
|
|
|
invoke-direct {p0, p1, p3, p2}, Lbg/e;-><init>(Ljava/io/File;Lcz/msebera/android/httpclient/entity/ContentType;Ljava/lang/String;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public b()Ljava/io/File;
|
|
.locals 1
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lbg/e;->b:Ljava/io/File;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public c()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, Lbg/e;->b: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, Lbg/e;->b:Ljava/io/File;
|
|
|
|
invoke-virtual {v0}, Ljava/io/File;->length()J
|
|
|
|
move-result-wide v0
|
|
|
|
return-wide v0
|
|
.end method
|
|
|
|
.method public getFilename()Ljava/lang/String;
|
|
.locals 1
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lbg/e;->c:Ljava/lang/String;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getTransferEncoding()Ljava/lang/String;
|
|
.locals 1
|
|
|
|
const-string v0, "binary"
|
|
|
|
return-object 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, Lbg/e;->b: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
|