.class public Lorg/apache/http/entity/BufferedHttpEntity; .super Lorg/apache/http/entity/HttpEntityWrapper; .source "BufferedHttpEntity.java" # instance fields .field private final buffer:[B # direct methods .method public constructor (Lorg/apache/http/HttpEntity;)V .registers 6 .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/IOException; } .end annotation .line 59 invoke-direct {p0, p1}, Lorg/apache/http/entity/HttpEntityWrapper;->(Lorg/apache/http/HttpEntity;)V .line 60 invoke-interface {p1}, Lorg/apache/http/HttpEntity;->isRepeatable()Z move-result v0 if-eqz v0, :cond_18 invoke-interface {p1}, Lorg/apache/http/HttpEntity;->getContentLength()J move-result-wide v0 const-wide/16 v2, 0x0 cmp-long v0, v0, v2 if-gez v0, :cond_14 goto :goto_18 :cond_14 const/4 p1, 0x0 .line 66 iput-object p1, p0, Lorg/apache/http/entity/BufferedHttpEntity;->buffer:[B goto :goto_29 .line 61 :cond_18 :goto_18 new-instance v0, Ljava/io/ByteArrayOutputStream; invoke-direct {v0}, Ljava/io/ByteArrayOutputStream;->()V .line 62 invoke-interface {p1, v0}, Lorg/apache/http/HttpEntity;->writeTo(Ljava/io/OutputStream;)V .line 63 invoke-virtual {v0}, Ljava/io/ByteArrayOutputStream;->flush()V .line 64 invoke-virtual {v0}, Ljava/io/ByteArrayOutputStream;->toByteArray()[B move-result-object p1 iput-object p1, p0, Lorg/apache/http/entity/BufferedHttpEntity;->buffer:[B :goto_29 return-void .end method # virtual methods .method public getContent()Ljava/io/InputStream; .registers 3 .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/IOException; } .end annotation .line 81 iget-object v0, p0, Lorg/apache/http/entity/BufferedHttpEntity;->buffer:[B if-eqz v0, :cond_c .line 82 new-instance v0, Ljava/io/ByteArrayInputStream; iget-object v1, p0, Lorg/apache/http/entity/BufferedHttpEntity;->buffer:[B invoke-direct {v0, v1}, Ljava/io/ByteArrayInputStream;->([B)V return-object v0 .line 84 :cond_c invoke-super {p0}, Lorg/apache/http/entity/HttpEntityWrapper;->getContent()Ljava/io/InputStream; move-result-object v0 return-object v0 .end method .method public getContentLength()J .registers 3 .line 72 iget-object v0, p0, Lorg/apache/http/entity/BufferedHttpEntity;->buffer:[B if-eqz v0, :cond_7 .line 73 array-length v0, v0 int-to-long v0, v0 return-wide v0 .line 75 :cond_7 invoke-super {p0}, Lorg/apache/http/entity/HttpEntityWrapper;->getContentLength()J move-result-wide v0 return-wide v0 .end method .method public isChunked()Z .registers 2 .line 95 iget-object v0, p0, Lorg/apache/http/entity/BufferedHttpEntity;->buffer:[B if-nez v0, :cond_c invoke-super {p0}, Lorg/apache/http/entity/HttpEntityWrapper;->isChunked()Z move-result v0 if-eqz v0, :cond_c const/4 v0, 0x1 goto :goto_d :cond_c const/4 v0, 0x0 :goto_d return v0 .end method .method public isRepeatable()Z .registers 2 const/4 v0, 0x1 return v0 .end method .method public isStreaming()Z .registers 2 .line 123 iget-object v0, p0, Lorg/apache/http/entity/BufferedHttpEntity;->buffer:[B if-nez v0, :cond_c invoke-super {p0}, Lorg/apache/http/entity/HttpEntityWrapper;->isStreaming()Z move-result v0 if-eqz v0, :cond_c const/4 v0, 0x1 goto :goto_d :cond_c const/4 v0, 0x0 :goto_d return v0 .end method .method public writeTo(Ljava/io/OutputStream;)V .registers 3 .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/IOException; } .end annotation .line 111 const-string v0, "Output stream" invoke-static {p1, v0}, Lorg/apache/http/util/Args;->notNull(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object; .line 112 iget-object v0, p0, Lorg/apache/http/entity/BufferedHttpEntity;->buffer:[B if-eqz v0, :cond_d .line 113 invoke-virtual {p1, v0}, Ljava/io/OutputStream;->write([B)V goto :goto_10 .line 115 :cond_d invoke-super {p0, p1}, Lorg/apache/http/entity/HttpEntityWrapper;->writeTo(Ljava/io/OutputStream;)V :goto_10 return-void .end method