742 lines
17 KiB
Smali
742 lines
17 KiB
Smali
.class public Lorg/apache/http/message/BasicHeaderValueFormatter;
|
|
.super Ljava/lang/Object;
|
|
.source "BasicHeaderValueFormatter.java"
|
|
|
|
# interfaces
|
|
.implements Lorg/apache/http/message/HeaderValueFormatter;
|
|
|
|
|
|
# static fields
|
|
.field public static final DEFAULT:Lorg/apache/http/message/BasicHeaderValueFormatter;
|
|
|
|
.field public static final SEPARATORS:Ljava/lang/String; = " ;,:@()<>\\\"/[]?={}\t"
|
|
|
|
.field public static final UNSAFE_CHARS:Ljava/lang/String; = "\"\\"
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 1
|
|
|
|
.line 1
|
|
new-instance v0, Lorg/apache/http/message/BasicHeaderValueFormatter;
|
|
|
|
invoke-direct {v0}, Lorg/apache/http/message/BasicHeaderValueFormatter;-><init>()V
|
|
|
|
sput-object v0, Lorg/apache/http/message/BasicHeaderValueFormatter;->DEFAULT:Lorg/apache/http/message/BasicHeaderValueFormatter;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final formatElements([Lorg/apache/http/HeaderElement;ZLorg/apache/http/message/HeaderValueFormatter;)Ljava/lang/String;
|
|
.locals 1
|
|
|
|
if-nez p2, :cond_0
|
|
|
|
.line 1
|
|
sget-object p2, Lorg/apache/http/message/BasicHeaderValueFormatter;->DEFAULT:Lorg/apache/http/message/BasicHeaderValueFormatter;
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
.line 2
|
|
invoke-interface {p2, v0, p0, p1}, Lorg/apache/http/message/HeaderValueFormatter;->formatElements(Lorg/apache/http/util/CharArrayBuffer;[Lorg/apache/http/HeaderElement;Z)Lorg/apache/http/util/CharArrayBuffer;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Lorg/apache/http/util/CharArrayBuffer;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final formatHeaderElement(Lorg/apache/http/HeaderElement;ZLorg/apache/http/message/HeaderValueFormatter;)Ljava/lang/String;
|
|
.locals 1
|
|
|
|
if-nez p2, :cond_0
|
|
|
|
.line 1
|
|
sget-object p2, Lorg/apache/http/message/BasicHeaderValueFormatter;->DEFAULT:Lorg/apache/http/message/BasicHeaderValueFormatter;
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
.line 2
|
|
invoke-interface {p2, v0, p0, p1}, Lorg/apache/http/message/HeaderValueFormatter;->formatHeaderElement(Lorg/apache/http/util/CharArrayBuffer;Lorg/apache/http/HeaderElement;Z)Lorg/apache/http/util/CharArrayBuffer;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Lorg/apache/http/util/CharArrayBuffer;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final formatNameValuePair(Lorg/apache/http/NameValuePair;ZLorg/apache/http/message/HeaderValueFormatter;)Ljava/lang/String;
|
|
.locals 1
|
|
|
|
if-nez p2, :cond_0
|
|
|
|
.line 1
|
|
sget-object p2, Lorg/apache/http/message/BasicHeaderValueFormatter;->DEFAULT:Lorg/apache/http/message/BasicHeaderValueFormatter;
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
.line 2
|
|
invoke-interface {p2, v0, p0, p1}, Lorg/apache/http/message/HeaderValueFormatter;->formatNameValuePair(Lorg/apache/http/util/CharArrayBuffer;Lorg/apache/http/NameValuePair;Z)Lorg/apache/http/util/CharArrayBuffer;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Lorg/apache/http/util/CharArrayBuffer;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final formatParameters([Lorg/apache/http/NameValuePair;ZLorg/apache/http/message/HeaderValueFormatter;)Ljava/lang/String;
|
|
.locals 1
|
|
|
|
if-nez p2, :cond_0
|
|
|
|
.line 1
|
|
sget-object p2, Lorg/apache/http/message/BasicHeaderValueFormatter;->DEFAULT:Lorg/apache/http/message/BasicHeaderValueFormatter;
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
.line 2
|
|
invoke-interface {p2, v0, p0, p1}, Lorg/apache/http/message/HeaderValueFormatter;->formatParameters(Lorg/apache/http/util/CharArrayBuffer;[Lorg/apache/http/NameValuePair;Z)Lorg/apache/http/util/CharArrayBuffer;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Lorg/apache/http/util/CharArrayBuffer;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public doFormatValue(Lorg/apache/http/util/CharArrayBuffer;Ljava/lang/String;Z)V
|
|
.locals 4
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-nez p3, :cond_0
|
|
|
|
move v1, v0
|
|
|
|
.line 1
|
|
:goto_0
|
|
invoke-virtual {p2}, Ljava/lang/String;->length()I
|
|
|
|
move-result v2
|
|
|
|
if-ge v1, v2, :cond_0
|
|
|
|
if-nez p3, :cond_0
|
|
|
|
.line 2
|
|
invoke-virtual {p2, v1}, Ljava/lang/String;->charAt(I)C
|
|
|
|
move-result p3
|
|
|
|
invoke-virtual {p0, p3}, Lorg/apache/http/message/BasicHeaderValueFormatter;->isSeparator(C)Z
|
|
|
|
move-result p3
|
|
|
|
add-int/lit8 v1, v1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/16 v1, 0x22
|
|
|
|
if-eqz p3, :cond_1
|
|
|
|
.line 3
|
|
invoke-virtual {p1, v1}, Lorg/apache/http/util/CharArrayBuffer;->append(C)V
|
|
|
|
.line 4
|
|
:cond_1
|
|
:goto_1
|
|
invoke-virtual {p2}, Ljava/lang/String;->length()I
|
|
|
|
move-result v2
|
|
|
|
if-ge v0, v2, :cond_3
|
|
|
|
.line 5
|
|
invoke-virtual {p2, v0}, Ljava/lang/String;->charAt(I)C
|
|
|
|
move-result v2
|
|
|
|
.line 6
|
|
invoke-virtual {p0, v2}, Lorg/apache/http/message/BasicHeaderValueFormatter;->isUnsafe(C)Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_2
|
|
|
|
const/16 v3, 0x5c
|
|
|
|
.line 7
|
|
invoke-virtual {p1, v3}, Lorg/apache/http/util/CharArrayBuffer;->append(C)V
|
|
|
|
.line 8
|
|
:cond_2
|
|
invoke-virtual {p1, v2}, Lorg/apache/http/util/CharArrayBuffer;->append(C)V
|
|
|
|
add-int/lit8 v0, v0, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_3
|
|
if-eqz p3, :cond_4
|
|
|
|
.line 9
|
|
invoke-virtual {p1, v1}, Lorg/apache/http/util/CharArrayBuffer;->append(C)V
|
|
|
|
:cond_4
|
|
return-void
|
|
.end method
|
|
|
|
.method public estimateElementsLen([Lorg/apache/http/HeaderElement;)I
|
|
.locals 3
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
.line 1
|
|
array-length v1, p1
|
|
|
|
const/4 v2, 0x1
|
|
|
|
if-ge v1, v2, :cond_0
|
|
|
|
goto :goto_1
|
|
|
|
.line 2
|
|
:cond_0
|
|
array-length v1, p1
|
|
|
|
sub-int/2addr v1, v2
|
|
|
|
mul-int/lit8 v1, v1, 0x2
|
|
|
|
.line 3
|
|
:goto_0
|
|
array-length v2, p1
|
|
|
|
if-ge v0, v2, :cond_1
|
|
|
|
.line 4
|
|
aget-object v2, p1, v0
|
|
|
|
invoke-virtual {p0, v2}, Lorg/apache/http/message/BasicHeaderValueFormatter;->estimateHeaderElementLen(Lorg/apache/http/HeaderElement;)I
|
|
|
|
move-result v2
|
|
|
|
add-int/2addr v1, v2
|
|
|
|
add-int/lit8 v0, v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
return v1
|
|
|
|
:cond_2
|
|
:goto_1
|
|
return v0
|
|
.end method
|
|
|
|
.method public estimateHeaderElementLen(Lorg/apache/http/HeaderElement;)I
|
|
.locals 4
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
return v0
|
|
|
|
.line 1
|
|
:cond_0
|
|
invoke-interface {p1}, Lorg/apache/http/HeaderElement;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Ljava/lang/String;->length()I
|
|
|
|
move-result v1
|
|
|
|
.line 2
|
|
invoke-interface {p1}, Lorg/apache/http/HeaderElement;->getValue()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
const/4 v3, 0x3
|
|
|
|
.line 3
|
|
invoke-static {v2, v3, v1}, Lp5/a;->a(Ljava/lang/String;II)I
|
|
|
|
move-result v1
|
|
|
|
.line 4
|
|
:cond_1
|
|
invoke-interface {p1}, Lorg/apache/http/HeaderElement;->getParameterCount()I
|
|
|
|
move-result v2
|
|
|
|
if-lez v2, :cond_2
|
|
|
|
:goto_0
|
|
if-ge v0, v2, :cond_2
|
|
|
|
.line 5
|
|
invoke-interface {p1, v0}, Lorg/apache/http/HeaderElement;->getParameter(I)Lorg/apache/http/NameValuePair;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {p0, v3}, Lorg/apache/http/message/BasicHeaderValueFormatter;->estimateNameValuePairLen(Lorg/apache/http/NameValuePair;)I
|
|
|
|
move-result v3
|
|
|
|
add-int/lit8 v3, v3, 0x2
|
|
|
|
add-int/2addr v1, v3
|
|
|
|
add-int/lit8 v0, v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
return v1
|
|
.end method
|
|
|
|
.method public estimateNameValuePairLen(Lorg/apache/http/NameValuePair;)I
|
|
.locals 2
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
return p1
|
|
|
|
.line 1
|
|
:cond_0
|
|
invoke-interface {p1}, Lorg/apache/http/NameValuePair;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Ljava/lang/String;->length()I
|
|
|
|
move-result v0
|
|
|
|
.line 2
|
|
invoke-interface {p1}, Lorg/apache/http/NameValuePair;->getValue()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
const/4 v1, 0x3
|
|
|
|
.line 3
|
|
invoke-static {p1, v1, v0}, Lp5/a;->a(Ljava/lang/String;II)I
|
|
|
|
move-result v0
|
|
|
|
:cond_1
|
|
return v0
|
|
.end method
|
|
|
|
.method public estimateParametersLen([Lorg/apache/http/NameValuePair;)I
|
|
.locals 3
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
.line 1
|
|
array-length v1, p1
|
|
|
|
const/4 v2, 0x1
|
|
|
|
if-ge v1, v2, :cond_0
|
|
|
|
goto :goto_1
|
|
|
|
.line 2
|
|
:cond_0
|
|
array-length v1, p1
|
|
|
|
sub-int/2addr v1, v2
|
|
|
|
mul-int/lit8 v1, v1, 0x2
|
|
|
|
.line 3
|
|
:goto_0
|
|
array-length v2, p1
|
|
|
|
if-ge v0, v2, :cond_1
|
|
|
|
.line 4
|
|
aget-object v2, p1, v0
|
|
|
|
invoke-virtual {p0, v2}, Lorg/apache/http/message/BasicHeaderValueFormatter;->estimateNameValuePairLen(Lorg/apache/http/NameValuePair;)I
|
|
|
|
move-result v2
|
|
|
|
add-int/2addr v1, v2
|
|
|
|
add-int/lit8 v0, v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
return v1
|
|
|
|
:cond_2
|
|
:goto_1
|
|
return v0
|
|
.end method
|
|
|
|
.method public formatElements(Lorg/apache/http/util/CharArrayBuffer;[Lorg/apache/http/HeaderElement;Z)Lorg/apache/http/util/CharArrayBuffer;
|
|
.locals 2
|
|
|
|
if-eqz p2, :cond_3
|
|
|
|
.line 3
|
|
invoke-virtual {p0, p2}, Lorg/apache/http/message/BasicHeaderValueFormatter;->estimateElementsLen([Lorg/apache/http/HeaderElement;)I
|
|
|
|
move-result v0
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
.line 4
|
|
new-instance p1, Lorg/apache/http/util/CharArrayBuffer;
|
|
|
|
invoke-direct {p1, v0}, Lorg/apache/http/util/CharArrayBuffer;-><init>(I)V
|
|
|
|
goto :goto_0
|
|
|
|
.line 5
|
|
:cond_0
|
|
invoke-virtual {p1, v0}, Lorg/apache/http/util/CharArrayBuffer;->ensureCapacity(I)V
|
|
|
|
:goto_0
|
|
const/4 v0, 0x0
|
|
|
|
.line 6
|
|
:goto_1
|
|
array-length v1, p2
|
|
|
|
if-ge v0, v1, :cond_2
|
|
|
|
if-lez v0, :cond_1
|
|
|
|
const-string v1, ", "
|
|
|
|
.line 7
|
|
invoke-virtual {p1, v1}, Lorg/apache/http/util/CharArrayBuffer;->append(Ljava/lang/String;)V
|
|
|
|
.line 8
|
|
:cond_1
|
|
aget-object v1, p2, v0
|
|
|
|
invoke-virtual {p0, p1, v1, p3}, Lorg/apache/http/message/BasicHeaderValueFormatter;->formatHeaderElement(Lorg/apache/http/util/CharArrayBuffer;Lorg/apache/http/HeaderElement;Z)Lorg/apache/http/util/CharArrayBuffer;
|
|
|
|
add-int/lit8 v0, v0, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
return-object p1
|
|
|
|
.line 9
|
|
:cond_3
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
const-string p2, "Header element array must not be null."
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public formatHeaderElement(Lorg/apache/http/util/CharArrayBuffer;Lorg/apache/http/HeaderElement;Z)Lorg/apache/http/util/CharArrayBuffer;
|
|
.locals 3
|
|
|
|
if-eqz p2, :cond_3
|
|
|
|
.line 3
|
|
invoke-virtual {p0, p2}, Lorg/apache/http/message/BasicHeaderValueFormatter;->estimateHeaderElementLen(Lorg/apache/http/HeaderElement;)I
|
|
|
|
move-result v0
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
.line 4
|
|
new-instance p1, Lorg/apache/http/util/CharArrayBuffer;
|
|
|
|
invoke-direct {p1, v0}, Lorg/apache/http/util/CharArrayBuffer;-><init>(I)V
|
|
|
|
goto :goto_0
|
|
|
|
.line 5
|
|
:cond_0
|
|
invoke-virtual {p1, v0}, Lorg/apache/http/util/CharArrayBuffer;->ensureCapacity(I)V
|
|
|
|
.line 6
|
|
:goto_0
|
|
invoke-interface {p2}, Lorg/apache/http/HeaderElement;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1, v0}, Lorg/apache/http/util/CharArrayBuffer;->append(Ljava/lang/String;)V
|
|
|
|
.line 7
|
|
invoke-interface {p2}, Lorg/apache/http/HeaderElement;->getValue()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
const/16 v1, 0x3d
|
|
|
|
.line 8
|
|
invoke-virtual {p1, v1}, Lorg/apache/http/util/CharArrayBuffer;->append(C)V
|
|
|
|
.line 9
|
|
invoke-virtual {p0, p1, v0, p3}, Lorg/apache/http/message/BasicHeaderValueFormatter;->doFormatValue(Lorg/apache/http/util/CharArrayBuffer;Ljava/lang/String;Z)V
|
|
|
|
.line 10
|
|
:cond_1
|
|
invoke-interface {p2}, Lorg/apache/http/HeaderElement;->getParameterCount()I
|
|
|
|
move-result v0
|
|
|
|
if-lez v0, :cond_2
|
|
|
|
const/4 v1, 0x0
|
|
|
|
:goto_1
|
|
if-ge v1, v0, :cond_2
|
|
|
|
const-string v2, "; "
|
|
|
|
.line 11
|
|
invoke-virtual {p1, v2}, Lorg/apache/http/util/CharArrayBuffer;->append(Ljava/lang/String;)V
|
|
|
|
.line 12
|
|
invoke-interface {p2, v1}, Lorg/apache/http/HeaderElement;->getParameter(I)Lorg/apache/http/NameValuePair;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {p0, p1, v2, p3}, Lorg/apache/http/message/BasicHeaderValueFormatter;->formatNameValuePair(Lorg/apache/http/util/CharArrayBuffer;Lorg/apache/http/NameValuePair;Z)Lorg/apache/http/util/CharArrayBuffer;
|
|
|
|
add-int/lit8 v1, v1, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
return-object p1
|
|
|
|
.line 13
|
|
:cond_3
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
const-string p2, "Header element must not be null."
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public formatNameValuePair(Lorg/apache/http/util/CharArrayBuffer;Lorg/apache/http/NameValuePair;Z)Lorg/apache/http/util/CharArrayBuffer;
|
|
.locals 1
|
|
|
|
if-eqz p2, :cond_2
|
|
|
|
.line 3
|
|
invoke-virtual {p0, p2}, Lorg/apache/http/message/BasicHeaderValueFormatter;->estimateNameValuePairLen(Lorg/apache/http/NameValuePair;)I
|
|
|
|
move-result v0
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
.line 4
|
|
new-instance p1, Lorg/apache/http/util/CharArrayBuffer;
|
|
|
|
invoke-direct {p1, v0}, Lorg/apache/http/util/CharArrayBuffer;-><init>(I)V
|
|
|
|
goto :goto_0
|
|
|
|
.line 5
|
|
:cond_0
|
|
invoke-virtual {p1, v0}, Lorg/apache/http/util/CharArrayBuffer;->ensureCapacity(I)V
|
|
|
|
.line 6
|
|
:goto_0
|
|
invoke-interface {p2}, Lorg/apache/http/NameValuePair;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1, v0}, Lorg/apache/http/util/CharArrayBuffer;->append(Ljava/lang/String;)V
|
|
|
|
.line 7
|
|
invoke-interface {p2}, Lorg/apache/http/NameValuePair;->getValue()Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
if-eqz p2, :cond_1
|
|
|
|
const/16 v0, 0x3d
|
|
|
|
.line 8
|
|
invoke-virtual {p1, v0}, Lorg/apache/http/util/CharArrayBuffer;->append(C)V
|
|
|
|
.line 9
|
|
invoke-virtual {p0, p1, p2, p3}, Lorg/apache/http/message/BasicHeaderValueFormatter;->doFormatValue(Lorg/apache/http/util/CharArrayBuffer;Ljava/lang/String;Z)V
|
|
|
|
:cond_1
|
|
return-object p1
|
|
|
|
.line 10
|
|
:cond_2
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
const-string p2, "NameValuePair must not be null."
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public formatParameters(Lorg/apache/http/util/CharArrayBuffer;[Lorg/apache/http/NameValuePair;Z)Lorg/apache/http/util/CharArrayBuffer;
|
|
.locals 2
|
|
|
|
if-eqz p2, :cond_3
|
|
|
|
.line 3
|
|
invoke-virtual {p0, p2}, Lorg/apache/http/message/BasicHeaderValueFormatter;->estimateParametersLen([Lorg/apache/http/NameValuePair;)I
|
|
|
|
move-result v0
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
.line 4
|
|
new-instance p1, Lorg/apache/http/util/CharArrayBuffer;
|
|
|
|
invoke-direct {p1, v0}, Lorg/apache/http/util/CharArrayBuffer;-><init>(I)V
|
|
|
|
goto :goto_0
|
|
|
|
.line 5
|
|
:cond_0
|
|
invoke-virtual {p1, v0}, Lorg/apache/http/util/CharArrayBuffer;->ensureCapacity(I)V
|
|
|
|
:goto_0
|
|
const/4 v0, 0x0
|
|
|
|
.line 6
|
|
:goto_1
|
|
array-length v1, p2
|
|
|
|
if-ge v0, v1, :cond_2
|
|
|
|
if-lez v0, :cond_1
|
|
|
|
const-string v1, "; "
|
|
|
|
.line 7
|
|
invoke-virtual {p1, v1}, Lorg/apache/http/util/CharArrayBuffer;->append(Ljava/lang/String;)V
|
|
|
|
.line 8
|
|
:cond_1
|
|
aget-object v1, p2, v0
|
|
|
|
invoke-virtual {p0, p1, v1, p3}, Lorg/apache/http/message/BasicHeaderValueFormatter;->formatNameValuePair(Lorg/apache/http/util/CharArrayBuffer;Lorg/apache/http/NameValuePair;Z)Lorg/apache/http/util/CharArrayBuffer;
|
|
|
|
add-int/lit8 v0, v0, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
return-object p1
|
|
|
|
.line 9
|
|
:cond_3
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
const-string p2, "Parameters must not be null."
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public isSeparator(C)Z
|
|
.locals 1
|
|
|
|
const-string v0, " ;,:@()<>\\\"/[]?={}\t"
|
|
|
|
.line 1
|
|
invoke-virtual {v0, p1}, Ljava/lang/String;->indexOf(I)I
|
|
|
|
move-result p1
|
|
|
|
if-ltz p1, :cond_0
|
|
|
|
const/4 p1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 p1, 0x0
|
|
|
|
:goto_0
|
|
return p1
|
|
.end method
|
|
|
|
.method public isUnsafe(C)Z
|
|
.locals 1
|
|
|
|
const-string v0, "\"\\"
|
|
|
|
.line 1
|
|
invoke-virtual {v0, p1}, Ljava/lang/String;->indexOf(I)I
|
|
|
|
move-result p1
|
|
|
|
if-ltz p1, :cond_0
|
|
|
|
const/4 p1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 p1, 0x0
|
|
|
|
:goto_0
|
|
return p1
|
|
.end method
|