912 lines
21 KiB
Smali
912 lines
21 KiB
Smali
.class public Lorg/apache/http/message/BasicHeaderValueParser;
|
|
.super Ljava/lang/Object;
|
|
.source "BasicHeaderValueParser.java"
|
|
|
|
# interfaces
|
|
.implements Lorg/apache/http/message/HeaderValueParser;
|
|
|
|
|
|
# static fields
|
|
.field private static final ALL_DELIMITERS:[C
|
|
|
|
.field public static final DEFAULT:Lorg/apache/http/message/BasicHeaderValueParser;
|
|
|
|
.field private static final ELEM_DELIMITER:C = ','
|
|
|
|
.field private static final PARAM_DELIMITER:C = ';'
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 1
|
|
|
|
.line 1
|
|
new-instance v0, Lorg/apache/http/message/BasicHeaderValueParser;
|
|
|
|
invoke-direct {v0}, Lorg/apache/http/message/BasicHeaderValueParser;-><init>()V
|
|
|
|
sput-object v0, Lorg/apache/http/message/BasicHeaderValueParser;->DEFAULT:Lorg/apache/http/message/BasicHeaderValueParser;
|
|
|
|
const/4 v0, 0x2
|
|
|
|
new-array v0, v0, [C
|
|
|
|
.line 2
|
|
fill-array-data v0, :array_0
|
|
|
|
sput-object v0, Lorg/apache/http/message/BasicHeaderValueParser;->ALL_DELIMITERS:[C
|
|
|
|
return-void
|
|
|
|
:array_0
|
|
.array-data 2
|
|
0x3bs
|
|
0x2cs
|
|
.end array-data
|
|
.end method
|
|
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private static isOneOf(C[C)Z
|
|
.locals 3
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
move v1, v0
|
|
|
|
.line 1
|
|
:goto_0
|
|
array-length v2, p1
|
|
|
|
if-ge v1, v2, :cond_1
|
|
|
|
.line 2
|
|
aget-char v2, p1, v1
|
|
|
|
if-ne p0, v2, :cond_0
|
|
|
|
const/4 p0, 0x1
|
|
|
|
return p0
|
|
|
|
:cond_0
|
|
add-int/lit8 v1, v1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
return v0
|
|
.end method
|
|
|
|
.method public static final parseElements(Ljava/lang/String;Lorg/apache/http/message/HeaderValueParser;)[Lorg/apache/http/HeaderElement;
|
|
.locals 3
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Lorg/apache/http/ParseException;
|
|
}
|
|
.end annotation
|
|
|
|
if-eqz p0, :cond_1
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
.line 1
|
|
sget-object p1, Lorg/apache/http/message/BasicHeaderValueParser;->DEFAULT:Lorg/apache/http/message/BasicHeaderValueParser;
|
|
|
|
.line 2
|
|
:cond_0
|
|
new-instance v0, Lorg/apache/http/util/CharArrayBuffer;
|
|
|
|
invoke-virtual {p0}, Ljava/lang/String;->length()I
|
|
|
|
move-result v1
|
|
|
|
invoke-direct {v0, v1}, Lorg/apache/http/util/CharArrayBuffer;-><init>(I)V
|
|
|
|
.line 3
|
|
invoke-virtual {v0, p0}, Lorg/apache/http/util/CharArrayBuffer;->append(Ljava/lang/String;)V
|
|
|
|
.line 4
|
|
new-instance v1, Lorg/apache/http/message/ParserCursor;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
invoke-virtual {p0}, Ljava/lang/String;->length()I
|
|
|
|
move-result p0
|
|
|
|
invoke-direct {v1, v2, p0}, Lorg/apache/http/message/ParserCursor;-><init>(II)V
|
|
|
|
.line 5
|
|
invoke-interface {p1, v0, v1}, Lorg/apache/http/message/HeaderValueParser;->parseElements(Lorg/apache/http/util/CharArrayBuffer;Lorg/apache/http/message/ParserCursor;)[Lorg/apache/http/HeaderElement;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
|
|
.line 6
|
|
:cond_1
|
|
new-instance p0, Ljava/lang/IllegalArgumentException;
|
|
|
|
const-string p1, "Value to parse may not be null"
|
|
|
|
invoke-direct {p0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p0
|
|
.end method
|
|
|
|
.method public static final parseHeaderElement(Ljava/lang/String;Lorg/apache/http/message/HeaderValueParser;)Lorg/apache/http/HeaderElement;
|
|
.locals 3
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Lorg/apache/http/ParseException;
|
|
}
|
|
.end annotation
|
|
|
|
if-eqz p0, :cond_1
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
.line 1
|
|
sget-object p1, Lorg/apache/http/message/BasicHeaderValueParser;->DEFAULT:Lorg/apache/http/message/BasicHeaderValueParser;
|
|
|
|
.line 2
|
|
:cond_0
|
|
new-instance v0, Lorg/apache/http/util/CharArrayBuffer;
|
|
|
|
invoke-virtual {p0}, Ljava/lang/String;->length()I
|
|
|
|
move-result v1
|
|
|
|
invoke-direct {v0, v1}, Lorg/apache/http/util/CharArrayBuffer;-><init>(I)V
|
|
|
|
.line 3
|
|
invoke-virtual {v0, p0}, Lorg/apache/http/util/CharArrayBuffer;->append(Ljava/lang/String;)V
|
|
|
|
.line 4
|
|
new-instance v1, Lorg/apache/http/message/ParserCursor;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
invoke-virtual {p0}, Ljava/lang/String;->length()I
|
|
|
|
move-result p0
|
|
|
|
invoke-direct {v1, v2, p0}, Lorg/apache/http/message/ParserCursor;-><init>(II)V
|
|
|
|
.line 5
|
|
invoke-interface {p1, v0, v1}, Lorg/apache/http/message/HeaderValueParser;->parseHeaderElement(Lorg/apache/http/util/CharArrayBuffer;Lorg/apache/http/message/ParserCursor;)Lorg/apache/http/HeaderElement;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
|
|
.line 6
|
|
:cond_1
|
|
new-instance p0, Ljava/lang/IllegalArgumentException;
|
|
|
|
const-string p1, "Value to parse may not be null"
|
|
|
|
invoke-direct {p0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p0
|
|
.end method
|
|
|
|
.method public static final parseNameValuePair(Ljava/lang/String;Lorg/apache/http/message/HeaderValueParser;)Lorg/apache/http/NameValuePair;
|
|
.locals 3
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Lorg/apache/http/ParseException;
|
|
}
|
|
.end annotation
|
|
|
|
if-eqz p0, :cond_1
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
.line 1
|
|
sget-object p1, Lorg/apache/http/message/BasicHeaderValueParser;->DEFAULT:Lorg/apache/http/message/BasicHeaderValueParser;
|
|
|
|
.line 2
|
|
:cond_0
|
|
new-instance v0, Lorg/apache/http/util/CharArrayBuffer;
|
|
|
|
invoke-virtual {p0}, Ljava/lang/String;->length()I
|
|
|
|
move-result v1
|
|
|
|
invoke-direct {v0, v1}, Lorg/apache/http/util/CharArrayBuffer;-><init>(I)V
|
|
|
|
.line 3
|
|
invoke-virtual {v0, p0}, Lorg/apache/http/util/CharArrayBuffer;->append(Ljava/lang/String;)V
|
|
|
|
.line 4
|
|
new-instance v1, Lorg/apache/http/message/ParserCursor;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
invoke-virtual {p0}, Ljava/lang/String;->length()I
|
|
|
|
move-result p0
|
|
|
|
invoke-direct {v1, v2, p0}, Lorg/apache/http/message/ParserCursor;-><init>(II)V
|
|
|
|
.line 5
|
|
invoke-interface {p1, v0, v1}, Lorg/apache/http/message/HeaderValueParser;->parseNameValuePair(Lorg/apache/http/util/CharArrayBuffer;Lorg/apache/http/message/ParserCursor;)Lorg/apache/http/NameValuePair;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
|
|
.line 6
|
|
:cond_1
|
|
new-instance p0, Ljava/lang/IllegalArgumentException;
|
|
|
|
const-string p1, "Value to parse may not be null"
|
|
|
|
invoke-direct {p0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p0
|
|
.end method
|
|
|
|
.method public static final parseParameters(Ljava/lang/String;Lorg/apache/http/message/HeaderValueParser;)[Lorg/apache/http/NameValuePair;
|
|
.locals 3
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Lorg/apache/http/ParseException;
|
|
}
|
|
.end annotation
|
|
|
|
if-eqz p0, :cond_1
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
.line 1
|
|
sget-object p1, Lorg/apache/http/message/BasicHeaderValueParser;->DEFAULT:Lorg/apache/http/message/BasicHeaderValueParser;
|
|
|
|
.line 2
|
|
:cond_0
|
|
new-instance v0, Lorg/apache/http/util/CharArrayBuffer;
|
|
|
|
invoke-virtual {p0}, Ljava/lang/String;->length()I
|
|
|
|
move-result v1
|
|
|
|
invoke-direct {v0, v1}, Lorg/apache/http/util/CharArrayBuffer;-><init>(I)V
|
|
|
|
.line 3
|
|
invoke-virtual {v0, p0}, Lorg/apache/http/util/CharArrayBuffer;->append(Ljava/lang/String;)V
|
|
|
|
.line 4
|
|
new-instance v1, Lorg/apache/http/message/ParserCursor;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
invoke-virtual {p0}, Ljava/lang/String;->length()I
|
|
|
|
move-result p0
|
|
|
|
invoke-direct {v1, v2, p0}, Lorg/apache/http/message/ParserCursor;-><init>(II)V
|
|
|
|
.line 5
|
|
invoke-interface {p1, v0, v1}, Lorg/apache/http/message/HeaderValueParser;->parseParameters(Lorg/apache/http/util/CharArrayBuffer;Lorg/apache/http/message/ParserCursor;)[Lorg/apache/http/NameValuePair;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
|
|
.line 6
|
|
:cond_1
|
|
new-instance p0, Ljava/lang/IllegalArgumentException;
|
|
|
|
const-string p1, "Value to parse may not be null"
|
|
|
|
invoke-direct {p0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public createHeaderElement(Ljava/lang/String;Ljava/lang/String;[Lorg/apache/http/NameValuePair;)Lorg/apache/http/HeaderElement;
|
|
.locals 1
|
|
|
|
.line 1
|
|
new-instance v0, Lorg/apache/http/message/BasicHeaderElement;
|
|
|
|
invoke-direct {v0, p1, p2, p3}, Lorg/apache/http/message/BasicHeaderElement;-><init>(Ljava/lang/String;Ljava/lang/String;[Lorg/apache/http/NameValuePair;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public createNameValuePair(Ljava/lang/String;Ljava/lang/String;)Lorg/apache/http/NameValuePair;
|
|
.locals 1
|
|
|
|
.line 1
|
|
new-instance v0, Lorg/apache/http/message/BasicNameValuePair;
|
|
|
|
invoke-direct {v0, p1, p2}, Lorg/apache/http/message/BasicNameValuePair;-><init>(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public parseElements(Lorg/apache/http/util/CharArrayBuffer;Lorg/apache/http/message/ParserCursor;)[Lorg/apache/http/HeaderElement;
|
|
.locals 3
|
|
|
|
if-eqz p1, :cond_4
|
|
|
|
if-eqz p2, :cond_3
|
|
|
|
.line 7
|
|
new-instance v0, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
.line 8
|
|
:cond_0
|
|
:goto_0
|
|
invoke-virtual {p2}, Lorg/apache/http/message/ParserCursor;->atEnd()Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_2
|
|
|
|
.line 9
|
|
invoke-virtual {p0, p1, p2}, Lorg/apache/http/message/BasicHeaderValueParser;->parseHeaderElement(Lorg/apache/http/util/CharArrayBuffer;Lorg/apache/http/message/ParserCursor;)Lorg/apache/http/HeaderElement;
|
|
|
|
move-result-object v1
|
|
|
|
.line 10
|
|
invoke-interface {v1}, Lorg/apache/http/HeaderElement;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Ljava/lang/String;->length()I
|
|
|
|
move-result v2
|
|
|
|
if-nez v2, :cond_1
|
|
|
|
invoke-interface {v1}, Lorg/apache/http/HeaderElement;->getValue()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
.line 11
|
|
:cond_1
|
|
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_0
|
|
|
|
.line 12
|
|
:cond_2
|
|
invoke-virtual {v0}, Ljava/util/ArrayList;->size()I
|
|
|
|
move-result p1
|
|
|
|
new-array p1, p1, [Lorg/apache/http/HeaderElement;
|
|
|
|
invoke-virtual {v0, p1}, Ljava/util/ArrayList;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, [Lorg/apache/http/HeaderElement;
|
|
|
|
return-object p1
|
|
|
|
.line 13
|
|
:cond_3
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
const-string p2, "Parser cursor may not be null"
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
.line 14
|
|
:cond_4
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
const-string p2, "Char array buffer may not be null"
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public parseHeaderElement(Lorg/apache/http/util/CharArrayBuffer;Lorg/apache/http/message/ParserCursor;)Lorg/apache/http/HeaderElement;
|
|
.locals 4
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
if-eqz p2, :cond_1
|
|
|
|
.line 7
|
|
invoke-virtual {p0, p1, p2}, Lorg/apache/http/message/BasicHeaderValueParser;->parseNameValuePair(Lorg/apache/http/util/CharArrayBuffer;Lorg/apache/http/message/ParserCursor;)Lorg/apache/http/NameValuePair;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
.line 8
|
|
invoke-virtual {p2}, Lorg/apache/http/message/ParserCursor;->atEnd()Z
|
|
|
|
move-result v2
|
|
|
|
if-nez v2, :cond_0
|
|
|
|
.line 9
|
|
invoke-virtual {p2}, Lorg/apache/http/message/ParserCursor;->getPos()I
|
|
|
|
move-result v2
|
|
|
|
add-int/lit8 v2, v2, -0x1
|
|
|
|
invoke-virtual {p1, v2}, Lorg/apache/http/util/CharArrayBuffer;->charAt(I)C
|
|
|
|
move-result v2
|
|
|
|
const/16 v3, 0x2c
|
|
|
|
if-eq v2, v3, :cond_0
|
|
|
|
.line 10
|
|
invoke-virtual {p0, p1, p2}, Lorg/apache/http/message/BasicHeaderValueParser;->parseParameters(Lorg/apache/http/util/CharArrayBuffer;Lorg/apache/http/message/ParserCursor;)[Lorg/apache/http/NameValuePair;
|
|
|
|
move-result-object v1
|
|
|
|
.line 11
|
|
:cond_0
|
|
invoke-interface {v0}, Lorg/apache/http/NameValuePair;->getName()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-interface {v0}, Lorg/apache/http/NameValuePair;->getValue()Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p0, p1, p2, v1}, Lorg/apache/http/message/BasicHeaderValueParser;->createHeaderElement(Ljava/lang/String;Ljava/lang/String;[Lorg/apache/http/NameValuePair;)Lorg/apache/http/HeaderElement;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
|
|
.line 12
|
|
:cond_1
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
const-string p2, "Parser cursor may not be null"
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
.line 13
|
|
:cond_2
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
const-string p2, "Char array buffer may not be null"
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public parseNameValuePair(Lorg/apache/http/util/CharArrayBuffer;Lorg/apache/http/message/ParserCursor;)Lorg/apache/http/NameValuePair;
|
|
.locals 1
|
|
|
|
.line 7
|
|
sget-object v0, Lorg/apache/http/message/BasicHeaderValueParser;->ALL_DELIMITERS:[C
|
|
|
|
invoke-virtual {p0, p1, p2, v0}, Lorg/apache/http/message/BasicHeaderValueParser;->parseNameValuePair(Lorg/apache/http/util/CharArrayBuffer;Lorg/apache/http/message/ParserCursor;[C)Lorg/apache/http/NameValuePair;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public parseNameValuePair(Lorg/apache/http/util/CharArrayBuffer;Lorg/apache/http/message/ParserCursor;[C)Lorg/apache/http/NameValuePair;
|
|
.locals 12
|
|
|
|
if-eqz p1, :cond_f
|
|
|
|
if-eqz p2, :cond_e
|
|
|
|
.line 8
|
|
invoke-virtual {p2}, Lorg/apache/http/message/ParserCursor;->getPos()I
|
|
|
|
move-result v0
|
|
|
|
.line 9
|
|
invoke-virtual {p2}, Lorg/apache/http/message/ParserCursor;->getPos()I
|
|
|
|
move-result v1
|
|
|
|
.line 10
|
|
invoke-virtual {p2}, Lorg/apache/http/message/ParserCursor;->getUpperBound()I
|
|
|
|
move-result v2
|
|
|
|
:goto_0
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x1
|
|
|
|
if-ge v0, v2, :cond_2
|
|
|
|
.line 11
|
|
invoke-virtual {p1, v0}, Lorg/apache/http/util/CharArrayBuffer;->charAt(I)C
|
|
|
|
move-result v5
|
|
|
|
const/16 v6, 0x3d
|
|
|
|
if-ne v5, v6, :cond_0
|
|
|
|
goto :goto_1
|
|
|
|
.line 12
|
|
:cond_0
|
|
invoke-static {v5, p3}, Lorg/apache/http/message/BasicHeaderValueParser;->isOneOf(C[C)Z
|
|
|
|
move-result v5
|
|
|
|
if-eqz v5, :cond_1
|
|
|
|
move v5, v4
|
|
|
|
goto :goto_2
|
|
|
|
:cond_1
|
|
add-int/lit8 v0, v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
:goto_1
|
|
move v5, v3
|
|
|
|
:goto_2
|
|
if-ne v0, v2, :cond_3
|
|
|
|
.line 13
|
|
invoke-virtual {p1, v1, v2}, Lorg/apache/http/util/CharArrayBuffer;->substringTrimmed(II)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
move v5, v4
|
|
|
|
goto :goto_3
|
|
|
|
.line 14
|
|
:cond_3
|
|
invoke-virtual {p1, v1, v0}, Lorg/apache/http/util/CharArrayBuffer;->substringTrimmed(II)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
add-int/lit8 v0, v0, 0x1
|
|
|
|
:goto_3
|
|
if-eqz v5, :cond_4
|
|
|
|
.line 15
|
|
invoke-virtual {p2, v0}, Lorg/apache/http/message/ParserCursor;->updatePos(I)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
.line 16
|
|
invoke-virtual {p0, v1, p1}, Lorg/apache/http/message/BasicHeaderValueParser;->createNameValuePair(Ljava/lang/String;Ljava/lang/String;)Lorg/apache/http/NameValuePair;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
|
|
:cond_4
|
|
move v6, v0
|
|
|
|
move v7, v3
|
|
|
|
move v8, v7
|
|
|
|
:goto_4
|
|
const/16 v9, 0x22
|
|
|
|
if-ge v6, v2, :cond_9
|
|
|
|
.line 17
|
|
invoke-virtual {p1, v6}, Lorg/apache/http/util/CharArrayBuffer;->charAt(I)C
|
|
|
|
move-result v10
|
|
|
|
if-ne v10, v9, :cond_5
|
|
|
|
if-nez v7, :cond_5
|
|
|
|
xor-int/lit8 v8, v8, 0x1
|
|
|
|
:cond_5
|
|
if-nez v8, :cond_6
|
|
|
|
if-nez v7, :cond_6
|
|
|
|
.line 18
|
|
invoke-static {v10, p3}, Lorg/apache/http/message/BasicHeaderValueParser;->isOneOf(C[C)Z
|
|
|
|
move-result v11
|
|
|
|
if-eqz v11, :cond_6
|
|
|
|
goto :goto_6
|
|
|
|
:cond_6
|
|
if-eqz v7, :cond_8
|
|
|
|
:cond_7
|
|
move v7, v3
|
|
|
|
goto :goto_5
|
|
|
|
:cond_8
|
|
if-eqz v8, :cond_7
|
|
|
|
const/16 v7, 0x5c
|
|
|
|
if-ne v10, v7, :cond_7
|
|
|
|
move v7, v4
|
|
|
|
:goto_5
|
|
add-int/lit8 v6, v6, 0x1
|
|
|
|
goto :goto_4
|
|
|
|
:cond_9
|
|
move v4, v5
|
|
|
|
:goto_6
|
|
if-ge v0, v6, :cond_a
|
|
|
|
.line 19
|
|
invoke-virtual {p1, v0}, Lorg/apache/http/util/CharArrayBuffer;->charAt(I)C
|
|
|
|
move-result p3
|
|
|
|
invoke-static {p3}, Lorg/apache/http/protocol/HTTP;->isWhitespace(C)Z
|
|
|
|
move-result p3
|
|
|
|
if-eqz p3, :cond_a
|
|
|
|
add-int/lit8 v0, v0, 0x1
|
|
|
|
goto :goto_6
|
|
|
|
:cond_a
|
|
move p3, v6
|
|
|
|
:goto_7
|
|
if-le p3, v0, :cond_b
|
|
|
|
add-int/lit8 v2, p3, -0x1
|
|
|
|
.line 20
|
|
invoke-virtual {p1, v2}, Lorg/apache/http/util/CharArrayBuffer;->charAt(I)C
|
|
|
|
move-result v2
|
|
|
|
invoke-static {v2}, Lorg/apache/http/protocol/HTTP;->isWhitespace(C)Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_b
|
|
|
|
add-int/lit8 p3, p3, -0x1
|
|
|
|
goto :goto_7
|
|
|
|
:cond_b
|
|
sub-int v2, p3, v0
|
|
|
|
const/4 v3, 0x2
|
|
|
|
if-lt v2, v3, :cond_c
|
|
|
|
.line 21
|
|
invoke-virtual {p1, v0}, Lorg/apache/http/util/CharArrayBuffer;->charAt(I)C
|
|
|
|
move-result v2
|
|
|
|
if-ne v2, v9, :cond_c
|
|
|
|
add-int/lit8 v2, p3, -0x1
|
|
|
|
invoke-virtual {p1, v2}, Lorg/apache/http/util/CharArrayBuffer;->charAt(I)C
|
|
|
|
move-result v2
|
|
|
|
if-ne v2, v9, :cond_c
|
|
|
|
add-int/lit8 v0, v0, 0x1
|
|
|
|
add-int/lit8 p3, p3, -0x1
|
|
|
|
.line 22
|
|
:cond_c
|
|
invoke-virtual {p1, v0, p3}, Lorg/apache/http/util/CharArrayBuffer;->substring(II)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz v4, :cond_d
|
|
|
|
add-int/lit8 v6, v6, 0x1
|
|
|
|
.line 23
|
|
:cond_d
|
|
invoke-virtual {p2, v6}, Lorg/apache/http/message/ParserCursor;->updatePos(I)V
|
|
|
|
.line 24
|
|
invoke-virtual {p0, v1, p1}, Lorg/apache/http/message/BasicHeaderValueParser;->createNameValuePair(Ljava/lang/String;Ljava/lang/String;)Lorg/apache/http/NameValuePair;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
|
|
.line 25
|
|
:cond_e
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
const-string p2, "Parser cursor may not be null"
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
.line 26
|
|
:cond_f
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
const-string p2, "Char array buffer may not be null"
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public parseParameters(Lorg/apache/http/util/CharArrayBuffer;Lorg/apache/http/message/ParserCursor;)[Lorg/apache/http/NameValuePair;
|
|
.locals 3
|
|
|
|
if-eqz p1, :cond_5
|
|
|
|
if-eqz p2, :cond_4
|
|
|
|
.line 7
|
|
invoke-virtual {p2}, Lorg/apache/http/message/ParserCursor;->getPos()I
|
|
|
|
move-result v0
|
|
|
|
.line 8
|
|
invoke-virtual {p2}, Lorg/apache/http/message/ParserCursor;->getUpperBound()I
|
|
|
|
move-result v1
|
|
|
|
:goto_0
|
|
if-ge v0, v1, :cond_0
|
|
|
|
.line 9
|
|
invoke-virtual {p1, v0}, Lorg/apache/http/util/CharArrayBuffer;->charAt(I)C
|
|
|
|
move-result v2
|
|
|
|
.line 10
|
|
invoke-static {v2}, Lorg/apache/http/protocol/HTTP;->isWhitespace(C)Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
add-int/lit8 v0, v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
.line 11
|
|
:cond_0
|
|
invoke-virtual {p2, v0}, Lorg/apache/http/message/ParserCursor;->updatePos(I)V
|
|
|
|
.line 12
|
|
invoke-virtual {p2}, Lorg/apache/http/message/ParserCursor;->atEnd()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
const/4 p1, 0x0
|
|
|
|
new-array p1, p1, [Lorg/apache/http/NameValuePair;
|
|
|
|
return-object p1
|
|
|
|
.line 13
|
|
:cond_1
|
|
new-instance v0, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
.line 14
|
|
:cond_2
|
|
invoke-virtual {p2}, Lorg/apache/http/message/ParserCursor;->atEnd()Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_3
|
|
|
|
.line 15
|
|
invoke-virtual {p0, p1, p2}, Lorg/apache/http/message/BasicHeaderValueParser;->parseNameValuePair(Lorg/apache/http/util/CharArrayBuffer;Lorg/apache/http/message/ParserCursor;)Lorg/apache/http/NameValuePair;
|
|
|
|
move-result-object v1
|
|
|
|
.line 16
|
|
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
.line 17
|
|
invoke-virtual {p2}, Lorg/apache/http/message/ParserCursor;->getPos()I
|
|
|
|
move-result v1
|
|
|
|
add-int/lit8 v1, v1, -0x1
|
|
|
|
invoke-virtual {p1, v1}, Lorg/apache/http/util/CharArrayBuffer;->charAt(I)C
|
|
|
|
move-result v1
|
|
|
|
const/16 v2, 0x2c
|
|
|
|
if-ne v1, v2, :cond_2
|
|
|
|
.line 18
|
|
:cond_3
|
|
invoke-virtual {v0}, Ljava/util/ArrayList;->size()I
|
|
|
|
move-result p1
|
|
|
|
new-array p1, p1, [Lorg/apache/http/NameValuePair;
|
|
|
|
invoke-virtual {v0, p1}, Ljava/util/ArrayList;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, [Lorg/apache/http/NameValuePair;
|
|
|
|
return-object p1
|
|
|
|
.line 19
|
|
:cond_4
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
const-string p2, "Parser cursor may not be null"
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
.line 20
|
|
:cond_5
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
const-string p2, "Char array buffer may not be null"
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
.end method
|