221 lines
		
	
	
		
			4.1 KiB
		
	
	
	
		
			Smali
		
	
	
	
	
	
			
		
		
	
	
			221 lines
		
	
	
		
			4.1 KiB
		
	
	
	
		
			Smali
		
	
	
	
	
	
| .class public Lzf/j;
 | |
| .super Lzf/a;
 | |
| .source "InputStreamEntity.java"
 | |
| 
 | |
| 
 | |
| # annotations
 | |
| .annotation build Lcz/msebera/android/httpclient/annotation/NotThreadSafe;
 | |
| .end annotation
 | |
| 
 | |
| 
 | |
| # instance fields
 | |
| .field public final e:Ljava/io/InputStream;
 | |
| 
 | |
| .field public final f:J
 | |
| 
 | |
| 
 | |
| # direct methods
 | |
| .method public constructor <init>(Ljava/io/InputStream;)V
 | |
|     .locals 2
 | |
| 
 | |
|     const-wide/16 v0, -0x1
 | |
| 
 | |
|     .line 1
 | |
|     invoke-direct {p0, p1, v0, v1}, Lzf/j;-><init>(Ljava/io/InputStream;J)V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public constructor <init>(Ljava/io/InputStream;J)V
 | |
|     .locals 1
 | |
| 
 | |
|     const/4 v0, 0x0
 | |
| 
 | |
|     .line 2
 | |
|     invoke-direct {p0, p1, p2, p3, v0}, Lzf/j;-><init>(Ljava/io/InputStream;JLcz/msebera/android/httpclient/entity/ContentType;)V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public constructor <init>(Ljava/io/InputStream;JLcz/msebera/android/httpclient/entity/ContentType;)V
 | |
|     .locals 1
 | |
| 
 | |
|     .line 4
 | |
|     invoke-direct {p0}, Lzf/a;-><init>()V
 | |
| 
 | |
|     const-string v0, "Source input stream"
 | |
| 
 | |
|     .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/InputStream;
 | |
| 
 | |
|     iput-object p1, p0, Lzf/j;->e:Ljava/io/InputStream;
 | |
| 
 | |
|     .line 6
 | |
|     iput-wide p2, p0, Lzf/j;->f:J
 | |
| 
 | |
|     if-eqz p4, :cond_0
 | |
| 
 | |
|     .line 7
 | |
|     invoke-virtual {p4}, 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/InputStream;Lcz/msebera/android/httpclient/entity/ContentType;)V
 | |
|     .locals 2
 | |
| 
 | |
|     const-wide/16 v0, -0x1
 | |
| 
 | |
|     .line 3
 | |
|     invoke-direct {p0, p1, v0, v1, p2}, Lzf/j;-><init>(Ljava/io/InputStream;JLcz/msebera/android/httpclient/entity/ContentType;)V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| 
 | |
| # virtual methods
 | |
| .method public getContent()Ljava/io/InputStream;
 | |
|     .locals 1
 | |
|     .annotation system Ldalvik/annotation/Throws;
 | |
|         value = {
 | |
|             Ljava/io/IOException;
 | |
|         }
 | |
|     .end annotation
 | |
| 
 | |
|     .line 1
 | |
|     iget-object v0, p0, Lzf/j;->e:Ljava/io/InputStream;
 | |
| 
 | |
|     return-object v0
 | |
| .end method
 | |
| 
 | |
| .method public getContentLength()J
 | |
|     .locals 2
 | |
| 
 | |
|     .line 1
 | |
|     iget-wide v0, p0, Lzf/j;->f:J
 | |
| 
 | |
|     return-wide v0
 | |
| .end method
 | |
| 
 | |
| .method public isRepeatable()Z
 | |
|     .locals 1
 | |
| 
 | |
|     const/4 v0, 0x0
 | |
| 
 | |
|     return v0
 | |
| .end method
 | |
| 
 | |
| .method public isStreaming()Z
 | |
|     .locals 1
 | |
| 
 | |
|     const/4 v0, 0x1
 | |
| 
 | |
|     return v0
 | |
| .end method
 | |
| 
 | |
| .method public writeTo(Ljava/io/OutputStream;)V
 | |
|     .locals 11
 | |
|     .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
 | |
|     iget-object v0, p0, Lzf/j;->e:Ljava/io/InputStream;
 | |
| 
 | |
|     const/16 v1, 0x1000
 | |
| 
 | |
|     :try_start_0
 | |
|     new-array v1, v1, [B
 | |
| 
 | |
|     .line 3
 | |
|     iget-wide v2, p0, Lzf/j;->f:J
 | |
| 
 | |
|     const-wide/16 v4, 0x0
 | |
| 
 | |
|     cmp-long v6, v2, v4
 | |
| 
 | |
|     const/4 v7, -0x1
 | |
| 
 | |
|     const/4 v8, 0x0
 | |
| 
 | |
|     if-gez v6, :cond_0
 | |
| 
 | |
|     .line 4
 | |
|     :goto_0
 | |
|     invoke-virtual {v0, v1}, Ljava/io/InputStream;->read([B)I
 | |
| 
 | |
|     move-result v2
 | |
| 
 | |
|     if-eq v2, v7, :cond_2
 | |
| 
 | |
|     .line 5
 | |
|     invoke-virtual {p1, v1, v8, v2}, Ljava/io/OutputStream;->write([BII)V
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     :cond_0
 | |
|     :goto_1
 | |
|     cmp-long v6, v2, v4
 | |
| 
 | |
|     if-lez v6, :cond_2
 | |
| 
 | |
|     const-wide/16 v9, 0x1000
 | |
| 
 | |
|     .line 6
 | |
|     invoke-static {v9, v10, v2, v3}, Ljava/lang/Math;->min(JJ)J
 | |
| 
 | |
|     move-result-wide v9
 | |
| 
 | |
|     long-to-int v6, v9
 | |
| 
 | |
|     invoke-virtual {v0, v1, v8, v6}, Ljava/io/InputStream;->read([BII)I
 | |
| 
 | |
|     move-result v6
 | |
| 
 | |
|     if-ne v6, v7, :cond_1
 | |
| 
 | |
|     goto :goto_2
 | |
| 
 | |
|     .line 7
 | |
|     :cond_1
 | |
|     invoke-virtual {p1, v1, v8, v6}, Ljava/io/OutputStream;->write([BII)V
 | |
|     :try_end_0
 | |
|     .catchall {:try_start_0 .. :try_end_0} :catchall_0
 | |
| 
 | |
|     int-to-long v9, v6
 | |
| 
 | |
|     sub-long/2addr v2, v9
 | |
| 
 | |
|     goto :goto_1
 | |
| 
 | |
|     .line 8
 | |
|     :cond_2
 | |
|     :goto_2
 | |
|     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
 |