apkfuckery/com.discord/smali/okhttp3/internal/framed/Header.smali
2019-02-04 21:05:16 +01:00

265 lines
6.4 KiB
Smali

.class public final Lokhttp3/internal/framed/Header;
.super Ljava/lang/Object;
.source "Header.java"
# static fields
.field public static final RESPONSE_STATUS:Lokio/ByteString;
.field public static final TARGET_AUTHORITY:Lokio/ByteString;
.field public static final TARGET_HOST:Lokio/ByteString;
.field public static final TARGET_METHOD:Lokio/ByteString;
.field public static final TARGET_PATH:Lokio/ByteString;
.field public static final TARGET_SCHEME:Lokio/ByteString;
.field public static final VERSION:Lokio/ByteString;
# instance fields
.field final hpackSize:I
.field public final name:Lokio/ByteString;
.field public final value:Lokio/ByteString;
# direct methods
.method static constructor <clinit>()V
.locals 1
.prologue
const-string v0, ":status"
invoke-static {v0}, Lokio/ByteString;->encodeUtf8(Ljava/lang/String;)Lokio/ByteString;
move-result-object v0
sput-object v0, Lokhttp3/internal/framed/Header;->RESPONSE_STATUS:Lokio/ByteString;
const-string v0, ":method"
invoke-static {v0}, Lokio/ByteString;->encodeUtf8(Ljava/lang/String;)Lokio/ByteString;
move-result-object v0
sput-object v0, Lokhttp3/internal/framed/Header;->TARGET_METHOD:Lokio/ByteString;
const-string v0, ":path"
invoke-static {v0}, Lokio/ByteString;->encodeUtf8(Ljava/lang/String;)Lokio/ByteString;
move-result-object v0
sput-object v0, Lokhttp3/internal/framed/Header;->TARGET_PATH:Lokio/ByteString;
const-string v0, ":scheme"
invoke-static {v0}, Lokio/ByteString;->encodeUtf8(Ljava/lang/String;)Lokio/ByteString;
move-result-object v0
sput-object v0, Lokhttp3/internal/framed/Header;->TARGET_SCHEME:Lokio/ByteString;
const-string v0, ":authority"
invoke-static {v0}, Lokio/ByteString;->encodeUtf8(Ljava/lang/String;)Lokio/ByteString;
move-result-object v0
sput-object v0, Lokhttp3/internal/framed/Header;->TARGET_AUTHORITY:Lokio/ByteString;
const-string v0, ":host"
invoke-static {v0}, Lokio/ByteString;->encodeUtf8(Ljava/lang/String;)Lokio/ByteString;
move-result-object v0
sput-object v0, Lokhttp3/internal/framed/Header;->TARGET_HOST:Lokio/ByteString;
const-string v0, ":version"
invoke-static {v0}, Lokio/ByteString;->encodeUtf8(Ljava/lang/String;)Lokio/ByteString;
move-result-object v0
sput-object v0, Lokhttp3/internal/framed/Header;->VERSION:Lokio/ByteString;
return-void
.end method
.method public constructor <init>(Ljava/lang/String;Ljava/lang/String;)V
.locals 2
.param p1, "name" # Ljava/lang/String;
.param p2, "value" # Ljava/lang/String;
.prologue
invoke-static {p1}, Lokio/ByteString;->encodeUtf8(Ljava/lang/String;)Lokio/ByteString;
move-result-object v0
invoke-static {p2}, Lokio/ByteString;->encodeUtf8(Ljava/lang/String;)Lokio/ByteString;
move-result-object v1
invoke-direct {p0, v0, v1}, Lokhttp3/internal/framed/Header;-><init>(Lokio/ByteString;Lokio/ByteString;)V
return-void
.end method
.method public constructor <init>(Lokio/ByteString;Ljava/lang/String;)V
.locals 1
.param p1, "name" # Lokio/ByteString;
.param p2, "value" # Ljava/lang/String;
.prologue
invoke-static {p2}, Lokio/ByteString;->encodeUtf8(Ljava/lang/String;)Lokio/ByteString;
move-result-object v0
invoke-direct {p0, p1, v0}, Lokhttp3/internal/framed/Header;-><init>(Lokio/ByteString;Lokio/ByteString;)V
return-void
.end method
.method public constructor <init>(Lokio/ByteString;Lokio/ByteString;)V
.locals 2
.param p1, "name" # Lokio/ByteString;
.param p2, "value" # Lokio/ByteString;
.prologue
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Lokhttp3/internal/framed/Header;->name:Lokio/ByteString;
iput-object p2, p0, Lokhttp3/internal/framed/Header;->value:Lokio/ByteString;
invoke-virtual {p1}, Lokio/ByteString;->size()I
move-result v0
add-int/lit8 v0, v0, 0x20
invoke-virtual {p2}, Lokio/ByteString;->size()I
move-result v1
add-int/2addr v0, v1
iput v0, p0, Lokhttp3/internal/framed/Header;->hpackSize:I
return-void
.end method
# virtual methods
.method public equals(Ljava/lang/Object;)Z
.locals 4
.param p1, "other" # Ljava/lang/Object;
.prologue
const/4 v1, 0x0
instance-of v2, p1, Lokhttp3/internal/framed/Header;
if-eqz v2, :cond_0
move-object v0, p1
check-cast v0, Lokhttp3/internal/framed/Header;
.local v0, "that":Lokhttp3/internal/framed/Header;
iget-object v2, p0, Lokhttp3/internal/framed/Header;->name:Lokio/ByteString;
iget-object v3, v0, Lokhttp3/internal/framed/Header;->name:Lokio/ByteString;
invoke-virtual {v2, v3}, Lokio/ByteString;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_0
iget-object v2, p0, Lokhttp3/internal/framed/Header;->value:Lokio/ByteString;
iget-object v3, v0, Lokhttp3/internal/framed/Header;->value:Lokio/ByteString;
invoke-virtual {v2, v3}, Lokio/ByteString;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_0
const/4 v1, 0x1
.end local v0 # "that":Lokhttp3/internal/framed/Header;
:cond_0
return v1
.end method
.method public hashCode()I
.locals 3
.prologue
const/16 v0, 0x11
.local v0, "result":I
iget-object v1, p0, Lokhttp3/internal/framed/Header;->name:Lokio/ByteString;
invoke-virtual {v1}, Lokio/ByteString;->hashCode()I
move-result v1
add-int/lit16 v0, v1, 0x20f
mul-int/lit8 v1, v0, 0x1f
iget-object v2, p0, Lokhttp3/internal/framed/Header;->value:Lokio/ByteString;
invoke-virtual {v2}, Lokio/ByteString;->hashCode()I
move-result v2
add-int v0, v1, v2
return v0
.end method
.method public toString()Ljava/lang/String;
.locals 4
.prologue
const-string v0, "%s: %s"
const/4 v1, 0x2
new-array v1, v1, [Ljava/lang/Object;
const/4 v2, 0x0
iget-object v3, p0, Lokhttp3/internal/framed/Header;->name:Lokio/ByteString;
invoke-virtual {v3}, Lokio/ByteString;->utf8()Ljava/lang/String;
move-result-object v3
aput-object v3, v1, v2
const/4 v2, 0x1
iget-object v3, p0, Lokhttp3/internal/framed/Header;->value:Lokio/ByteString;
invoke-virtual {v3}, Lokio/ByteString;->utf8()Ljava/lang/String;
move-result-object v3
aput-object v3, v1, v2
invoke-static {v0, v1}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object v0
return-object v0
.end method