159 lines
3.4 KiB
Smali
159 lines
3.4 KiB
Smali
.class public abstract Lorg/apache/http/entity/AbstractHttpEntity;
|
|
.super Ljava/lang/Object;
|
|
.source "AbstractHttpEntity.java"
|
|
|
|
# interfaces
|
|
.implements Lorg/apache/http/HttpEntity;
|
|
|
|
|
|
# instance fields
|
|
.field public chunked:Z
|
|
|
|
.field public contentEncoding:Lorg/apache/http/Header;
|
|
|
|
.field public contentType:Lorg/apache/http/Header;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public consumeContent()V
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;,
|
|
Ljava/lang/UnsupportedOperationException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
invoke-interface {p0}, Lorg/apache/http/HttpEntity;->isStreaming()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
return-void
|
|
|
|
.line 2
|
|
:cond_0
|
|
new-instance v0, Ljava/lang/UnsupportedOperationException;
|
|
|
|
const-string v1, "streaming entity does not implement consumeContent()"
|
|
|
|
invoke-direct {v0, v1}, Ljava/lang/UnsupportedOperationException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public getContentEncoding()Lorg/apache/http/Header;
|
|
.locals 1
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lorg/apache/http/entity/AbstractHttpEntity;->contentEncoding:Lorg/apache/http/Header;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getContentType()Lorg/apache/http/Header;
|
|
.locals 1
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lorg/apache/http/entity/AbstractHttpEntity;->contentType:Lorg/apache/http/Header;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public isChunked()Z
|
|
.locals 1
|
|
|
|
.line 1
|
|
iget-boolean v0, p0, Lorg/apache/http/entity/AbstractHttpEntity;->chunked:Z
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public setChunked(Z)V
|
|
.locals 0
|
|
|
|
.line 1
|
|
iput-boolean p1, p0, Lorg/apache/http/entity/AbstractHttpEntity;->chunked:Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setContentEncoding(Ljava/lang/String;)V
|
|
.locals 2
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
.line 2
|
|
new-instance v0, Lorg/apache/http/message/BasicHeader;
|
|
|
|
const-string v1, "Content-Encoding"
|
|
|
|
invoke-direct {v0, v1, p1}, Lorg/apache/http/message/BasicHeader;-><init>(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
.line 3
|
|
:goto_0
|
|
invoke-virtual {p0, v0}, Lorg/apache/http/entity/AbstractHttpEntity;->setContentEncoding(Lorg/apache/http/Header;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setContentEncoding(Lorg/apache/http/Header;)V
|
|
.locals 0
|
|
|
|
.line 1
|
|
iput-object p1, p0, Lorg/apache/http/entity/AbstractHttpEntity;->contentEncoding:Lorg/apache/http/Header;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setContentType(Ljava/lang/String;)V
|
|
.locals 2
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
.line 2
|
|
new-instance v0, Lorg/apache/http/message/BasicHeader;
|
|
|
|
const-string v1, "Content-Type"
|
|
|
|
invoke-direct {v0, v1, p1}, Lorg/apache/http/message/BasicHeader;-><init>(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
.line 3
|
|
:goto_0
|
|
invoke-virtual {p0, v0}, Lorg/apache/http/entity/AbstractHttpEntity;->setContentType(Lorg/apache/http/Header;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setContentType(Lorg/apache/http/Header;)V
|
|
.locals 0
|
|
|
|
.line 1
|
|
iput-object p1, p0, Lorg/apache/http/entity/AbstractHttpEntity;->contentType:Lorg/apache/http/Header;
|
|
|
|
return-void
|
|
.end method
|