237 lines
5.2 KiB
Smali
237 lines
5.2 KiB
Smali
.class public final Lokhttp3/MediaType;
|
|
.super Ljava/lang/Object;
|
|
.source "MediaType.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lokhttp3/MediaType$a;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final e:Ljava/util/regex/Pattern;
|
|
|
|
.field public static final f:Ljava/util/regex/Pattern;
|
|
|
|
.field public static final g:Lokhttp3/MediaType$a;
|
|
|
|
|
|
# instance fields
|
|
.field public final a:Ljava/lang/String;
|
|
|
|
.field public final b:Ljava/lang/String;
|
|
|
|
.field public final c:Ljava/lang/String;
|
|
|
|
.field public final d:[Ljava/lang/String;
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 1
|
|
|
|
const-string v0, "([a-zA-Z0-9-!#$%&\'*+.^_`{|}~]+)/([a-zA-Z0-9-!#$%&\'*+.^_`{|}~]+)"
|
|
|
|
invoke-static {v0}, Ljava/util/regex/Pattern;->compile(Ljava/lang/String;)Ljava/util/regex/Pattern;
|
|
|
|
move-result-object v0
|
|
|
|
sput-object v0, Lokhttp3/MediaType;->e:Ljava/util/regex/Pattern;
|
|
|
|
const-string v0, ";\\s*(?:([a-zA-Z0-9-!#$%&\'*+.^_`{|}~]+)=(?:([a-zA-Z0-9-!#$%&\'*+.^_`{|}~]+)|\"([^\"]*)\"))?"
|
|
|
|
invoke-static {v0}, Ljava/util/regex/Pattern;->compile(Ljava/lang/String;)Ljava/util/regex/Pattern;
|
|
|
|
move-result-object v0
|
|
|
|
sput-object v0, Lokhttp3/MediaType;->f:Ljava/util/regex/Pattern;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
iput-object p1, p0, Lokhttp3/MediaType;->a:Ljava/lang/String;
|
|
|
|
iput-object p2, p0, Lokhttp3/MediaType;->b:Ljava/lang/String;
|
|
|
|
iput-object p3, p0, Lokhttp3/MediaType;->c:Ljava/lang/String;
|
|
|
|
iput-object p4, p0, Lokhttp3/MediaType;->d:[Ljava/lang/String;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static synthetic b(Lokhttp3/MediaType;Ljava/nio/charset/Charset;I)Ljava/nio/charset/Charset;
|
|
.locals 0
|
|
|
|
and-int/lit8 p1, p2, 0x1
|
|
|
|
const/4 p1, 0x0
|
|
|
|
invoke-virtual {p0, p1}, Lokhttp3/MediaType;->a(Ljava/nio/charset/Charset;)Ljava/nio/charset/Charset;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final c(Ljava/lang/String;)Lokhttp3/MediaType;
|
|
.locals 0
|
|
|
|
invoke-static {p0}, Lokhttp3/MediaType$a;->a(Ljava/lang/String;)Lokhttp3/MediaType;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final a(Ljava/nio/charset/Charset;)Ljava/nio/charset/Charset;
|
|
.locals 6
|
|
|
|
const-string v0, "charset"
|
|
|
|
const-string v1, "name"
|
|
|
|
invoke-static {v0, v1}, Lb0/n/c/j;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iget-object v1, p0, Lokhttp3/MediaType;->d:[Ljava/lang/String;
|
|
|
|
const-string v2, "$this$indices"
|
|
|
|
invoke-static {v1, v2}, Lb0/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
new-instance v2, Lkotlin/ranges/IntRange;
|
|
|
|
invoke-static {v1}, Lf/h/a/f/f/n/f;->getLastIndex([Ljava/lang/Object;)I
|
|
|
|
move-result v1
|
|
|
|
const/4 v3, 0x0
|
|
|
|
invoke-direct {v2, v3, v1}, Lkotlin/ranges/IntRange;-><init>(II)V
|
|
|
|
const/4 v1, 0x2
|
|
|
|
invoke-static {v2, v1}, Lb0/q/e;->step(Lkotlin/ranges/IntProgression;I)Lkotlin/ranges/IntProgression;
|
|
|
|
move-result-object v1
|
|
|
|
iget v2, v1, Lkotlin/ranges/IntProgression;->d:I
|
|
|
|
iget v3, v1, Lkotlin/ranges/IntProgression;->e:I
|
|
|
|
iget v1, v1, Lkotlin/ranges/IntProgression;->f:I
|
|
|
|
if-ltz v1, :cond_0
|
|
|
|
if-gt v2, v3, :cond_2
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
if-lt v2, v3, :cond_2
|
|
|
|
:goto_0
|
|
iget-object v4, p0, Lokhttp3/MediaType;->d:[Ljava/lang/String;
|
|
|
|
aget-object v4, v4, v2
|
|
|
|
const/4 v5, 0x1
|
|
|
|
invoke-static {v4, v0, v5}, Lb0/t/k;->equals(Ljava/lang/String;Ljava/lang/String;Z)Z
|
|
|
|
move-result v4
|
|
|
|
if-eqz v4, :cond_1
|
|
|
|
iget-object v0, p0, Lokhttp3/MediaType;->d:[Ljava/lang/String;
|
|
|
|
add-int/2addr v2, v5
|
|
|
|
aget-object v0, v0, v2
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
if-eq v2, v3, :cond_2
|
|
|
|
add-int/2addr v2, v1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
const/4 v0, 0x0
|
|
|
|
:goto_1
|
|
if-eqz v0, :cond_3
|
|
|
|
:try_start_0
|
|
invoke-static {v0}, Ljava/nio/charset/Charset;->forName(Ljava/lang/String;)Ljava/nio/charset/Charset;
|
|
|
|
move-result-object p1
|
|
:try_end_0
|
|
.catch Ljava/lang/IllegalArgumentException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
:catch_0
|
|
:cond_3
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public equals(Ljava/lang/Object;)Z
|
|
.locals 1
|
|
|
|
instance-of v0, p1, Lokhttp3/MediaType;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
check-cast p1, Lokhttp3/MediaType;
|
|
|
|
iget-object p1, p1, Lokhttp3/MediaType;->a:Ljava/lang/String;
|
|
|
|
iget-object v0, p0, Lokhttp3/MediaType;->a:Ljava/lang/String;
|
|
|
|
invoke-static {p1, v0}, Lb0/n/c/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
const/4 p1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 p1, 0x0
|
|
|
|
:goto_0
|
|
return p1
|
|
.end method
|
|
|
|
.method public hashCode()I
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lokhttp3/MediaType;->a:Ljava/lang/String;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/String;->hashCode()I
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public toString()Ljava/lang/String;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lokhttp3/MediaType;->a:Ljava/lang/String;
|
|
|
|
return-object v0
|
|
.end method
|