.class public Lorg/apache/http/entity/EntityTemplate; .super Lorg/apache/http/entity/AbstractHttpEntity; .source "EntityTemplate.java" # instance fields .field private final contentproducer:Lorg/apache/http/entity/ContentProducer; # direct methods .method public constructor (Lorg/apache/http/entity/ContentProducer;)V .registers 3 .line 49 invoke-direct {p0}, Lorg/apache/http/entity/AbstractHttpEntity;->()V .line 50 const-string v0, "Content producer" invoke-static {p1, v0}, Lorg/apache/http/util/Args;->notNull(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object; move-result-object p1 check-cast p1, Lorg/apache/http/entity/ContentProducer; iput-object p1, p0, Lorg/apache/http/entity/EntityTemplate;->contentproducer:Lorg/apache/http/entity/ContentProducer; 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 60 new-instance v0, Ljava/io/ByteArrayOutputStream; invoke-direct {v0}, Ljava/io/ByteArrayOutputStream;->()V .line 61 invoke-virtual {p0, v0}, Lorg/apache/http/entity/EntityTemplate;->writeTo(Ljava/io/OutputStream;)V .line 62 new-instance v1, Ljava/io/ByteArrayInputStream; invoke-virtual {v0}, Ljava/io/ByteArrayOutputStream;->toByteArray()[B move-result-object v0 invoke-direct {v1, v0}, Ljava/io/ByteArrayInputStream;->([B)V return-object v1 .end method .method public getContentLength()J .registers 3 const-wide/16 v0, -0x1 return-wide v0 .end method .method public isRepeatable()Z .registers 2 const/4 v0, 0x1 return v0 .end method .method public isStreaming()Z .registers 2 const/4 v0, 0x0 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 72 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 73 iget-object v0, p0, Lorg/apache/http/entity/EntityTemplate;->contentproducer:Lorg/apache/http/entity/ContentProducer; invoke-interface {v0, p1}, Lorg/apache/http/entity/ContentProducer;->writeTo(Ljava/io/OutputStream;)V return-void .end method