1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149 |
- .class public final Lokhttp3/HttpUrl;
- .super Ljava/lang/Object;
- .source ""
- # annotations
- .annotation system Ldalvik/annotation/MemberClasses;
- value = {
- Lokhttp3/HttpUrl$Builder;
- }
- .end annotation
- # static fields
- .field static final FORM_ENCODE_SET:Ljava/lang/String; = " \"\':;<=>@[]^`{}|/\\?#&!$(),~"
- .field static final FRAGMENT_ENCODE_SET:Ljava/lang/String; = ""
- .field static final FRAGMENT_ENCODE_SET_URI:Ljava/lang/String; = " \"#<>\\^`{|}"
- .field private static final HEX_DIGITS:[C
- .field static final PASSWORD_ENCODE_SET:Ljava/lang/String; = " \"\':;<=>@[]^`{}|/\\?#"
- .field static final PATH_SEGMENT_ENCODE_SET:Ljava/lang/String; = " \"<>^`{}|/\\?#"
- .field static final PATH_SEGMENT_ENCODE_SET_URI:Ljava/lang/String; = "[]"
- .field static final QUERY_COMPONENT_ENCODE_SET:Ljava/lang/String; = " \"\'<>#&="
- .field static final QUERY_COMPONENT_ENCODE_SET_URI:Ljava/lang/String; = "\\^`{|}"
- .field static final QUERY_ENCODE_SET:Ljava/lang/String; = " \"\'<>#"
- .field static final USERNAME_ENCODE_SET:Ljava/lang/String; = " \"\':;<=>@[]^`{}|/\\?#"
- # instance fields
- .field private final fragment:Ljava/lang/String;
- .field final host:Ljava/lang/String;
- .field private final password:Ljava/lang/String;
- .field private final pathSegments:Ljava/util/List;
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "Ljava/util/List<",
- "Ljava/lang/String;",
- ">;"
- }
- .end annotation
- .end field
- .field final port:I
- .field private final queryNamesAndValues:Ljava/util/List;
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "Ljava/util/List<",
- "Ljava/lang/String;",
- ">;"
- }
- .end annotation
- .end field
- .field final scheme:Ljava/lang/String;
- .field private final url:Ljava/lang/String;
- .field private final username:Ljava/lang/String;
- # direct methods
- .method static constructor <clinit>()V
- .locals 1
- const/16 v0, 0x10
- new-array v0, v0, [C
- fill-array-data v0, :array_0
- sput-object v0, Lokhttp3/HttpUrl;->HEX_DIGITS:[C
- return-void
- :array_0
- .array-data 2
- 0x30s
- 0x31s
- 0x32s
- 0x33s
- 0x34s
- 0x35s
- 0x36s
- 0x37s
- 0x38s
- 0x39s
- 0x41s
- 0x42s
- 0x43s
- 0x44s
- 0x45s
- 0x46s
- .end array-data
- .end method
- .method constructor <init>(Lokhttp3/HttpUrl$Builder;)V
- .locals 4
- invoke-direct {p0}, Ljava/lang/Object;-><init>()V
- iget-object v0, p1, Lokhttp3/HttpUrl$Builder;->scheme:Ljava/lang/String;
- iput-object v0, p0, Lokhttp3/HttpUrl;->scheme:Ljava/lang/String;
- iget-object v0, p1, Lokhttp3/HttpUrl$Builder;->encodedUsername:Ljava/lang/String;
- const/4 v1, 0x0
- invoke-static {v0, v1}, Lokhttp3/HttpUrl;->percentDecode(Ljava/lang/String;Z)Ljava/lang/String;
- move-result-object v0
- iput-object v0, p0, Lokhttp3/HttpUrl;->username:Ljava/lang/String;
- iget-object v0, p1, Lokhttp3/HttpUrl$Builder;->encodedPassword:Ljava/lang/String;
- invoke-static {v0, v1}, Lokhttp3/HttpUrl;->percentDecode(Ljava/lang/String;Z)Ljava/lang/String;
- move-result-object v0
- iput-object v0, p0, Lokhttp3/HttpUrl;->password:Ljava/lang/String;
- iget-object v0, p1, Lokhttp3/HttpUrl$Builder;->host:Ljava/lang/String;
- iput-object v0, p0, Lokhttp3/HttpUrl;->host:Ljava/lang/String;
- invoke-virtual {p1}, Lokhttp3/HttpUrl$Builder;->effectivePort()I
- move-result v0
- iput v0, p0, Lokhttp3/HttpUrl;->port:I
- iget-object v0, p1, Lokhttp3/HttpUrl$Builder;->encodedPathSegments:Ljava/util/List;
- invoke-direct {p0, v0, v1}, Lokhttp3/HttpUrl;->percentDecode(Ljava/util/List;Z)Ljava/util/List;
- move-result-object v0
- iput-object v0, p0, Lokhttp3/HttpUrl;->pathSegments:Ljava/util/List;
- iget-object v0, p1, Lokhttp3/HttpUrl$Builder;->encodedQueryNamesAndValues:Ljava/util/List;
- const/4 v2, 0x0
- if-eqz v0, :cond_0
- const/4 v3, 0x1
- invoke-direct {p0, v0, v3}, Lokhttp3/HttpUrl;->percentDecode(Ljava/util/List;Z)Ljava/util/List;
- move-result-object v0
- goto :goto_0
- :cond_0
- move-object v0, v2
- :goto_0
- iput-object v0, p0, Lokhttp3/HttpUrl;->queryNamesAndValues:Ljava/util/List;
- iget-object v0, p1, Lokhttp3/HttpUrl$Builder;->encodedFragment:Ljava/lang/String;
- if-eqz v0, :cond_1
- invoke-static {v0, v1}, Lokhttp3/HttpUrl;->percentDecode(Ljava/lang/String;Z)Ljava/lang/String;
- move-result-object v2
- :cond_1
- iput-object v2, p0, Lokhttp3/HttpUrl;->fragment:Ljava/lang/String;
- invoke-virtual {p1}, Lokhttp3/HttpUrl$Builder;->toString()Ljava/lang/String;
- move-result-object p1
- iput-object p1, p0, Lokhttp3/HttpUrl;->url:Ljava/lang/String;
- return-void
- .end method
- .method static canonicalize(Ljava/lang/String;IILjava/lang/String;ZZZZLjava/nio/charset/Charset;)Ljava/lang/String;
- .locals 11
- move-object v1, p0
- move v3, p2
- move v2, p1
- :goto_0
- if-ge v2, v3, :cond_5
- invoke-virtual {p0, v2}, Ljava/lang/String;->codePointAt(I)I
- move-result v0
- const/16 v4, 0x20
- if-lt v0, v4, :cond_3
- const/16 v4, 0x7f
- if-eq v0, v4, :cond_3
- const/16 v4, 0x80
- if-lt v0, v4, :cond_0
- if-nez p7, :cond_3
- :cond_0
- move-object v4, p3
- invoke-virtual {p3, v0}, Ljava/lang/String;->indexOf(I)I
- move-result v5
- const/4 v6, -0x1
- if-ne v5, v6, :cond_4
- const/16 v5, 0x25
- if-ne v0, v5, :cond_1
- if-eqz p4, :cond_4
- if-eqz p5, :cond_1
- invoke-static {p0, v2, p2}, Lokhttp3/HttpUrl;->percentEncoded(Ljava/lang/String;II)Z
- move-result v5
- if-eqz v5, :cond_4
- :cond_1
- const/16 v5, 0x2b
- if-ne v0, v5, :cond_2
- if-eqz p6, :cond_2
- goto :goto_1
- :cond_2
- invoke-static {v0}, Ljava/lang/Character;->charCount(I)I
- move-result v0
- add-int/2addr v2, v0
- goto :goto_0
- :cond_3
- move-object v4, p3
- :cond_4
- :goto_1
- new-instance v10, Lokio/Buffer;
- invoke-direct {v10}, Lokio/Buffer;-><init>()V
- move v0, p1
- invoke-virtual {v10, p0, p1, v2}, Lokio/Buffer;->writeUtf8(Ljava/lang/String;II)Lokio/Buffer;
- move-object v0, v10
- move-object v1, p0
- move v3, p2
- move-object v4, p3
- move v5, p4
- move/from16 v6, p5
- move/from16 v7, p6
- move/from16 v8, p7
- move-object/from16 v9, p8
- invoke-static/range {v0 .. v9}, Lokhttp3/HttpUrl;->canonicalize(Lokio/Buffer;Ljava/lang/String;IILjava/lang/String;ZZZZLjava/nio/charset/Charset;)V
- invoke-virtual {v10}, Lokio/Buffer;->readUtf8()Ljava/lang/String;
- move-result-object v0
- return-object v0
- :cond_5
- move v0, p1
- invoke-virtual {p0, p1, p2}, Ljava/lang/String;->substring(II)Ljava/lang/String;
- move-result-object v0
- return-object v0
- .end method
- .method static canonicalize(Ljava/lang/String;Ljava/lang/String;ZZZZ)Ljava/lang/String;
- .locals 9
- invoke-virtual {p0}, Ljava/lang/String;->length()I
- move-result v2
- const/4 v1, 0x0
- const/4 v8, 0x0
- move-object v0, p0
- move-object v3, p1
- move v4, p2
- move v5, p3
- move v6, p4
- move v7, p5
- invoke-static/range {v0 .. v8}, Lokhttp3/HttpUrl;->canonicalize(Ljava/lang/String;IILjava/lang/String;ZZZZLjava/nio/charset/Charset;)Ljava/lang/String;
- move-result-object p0
- return-object p0
- .end method
- .method static canonicalize(Ljava/lang/String;Ljava/lang/String;ZZZZLjava/nio/charset/Charset;)Ljava/lang/String;
- .locals 9
- invoke-virtual {p0}, Ljava/lang/String;->length()I
- move-result v2
- const/4 v1, 0x0
- move-object v0, p0
- move-object v3, p1
- move v4, p2
- move v5, p3
- move v6, p4
- move v7, p5
- move-object v8, p6
- invoke-static/range {v0 .. v8}, Lokhttp3/HttpUrl;->canonicalize(Ljava/lang/String;IILjava/lang/String;ZZZZLjava/nio/charset/Charset;)Ljava/lang/String;
- move-result-object p0
- return-object p0
- .end method
- .method static canonicalize(Lokio/Buffer;Ljava/lang/String;IILjava/lang/String;ZZZZLjava/nio/charset/Charset;)V
- .locals 6
- const/4 v0, 0x0
- :goto_0
- if-ge p2, p3, :cond_a
- invoke-virtual {p1, p2}, Ljava/lang/String;->codePointAt(I)I
- move-result v1
- if-eqz p5, :cond_0
- const/16 v2, 0x9
- if-eq v1, v2, :cond_9
- const/16 v2, 0xa
- if-eq v1, v2, :cond_9
- const/16 v2, 0xc
- if-eq v1, v2, :cond_9
- const/16 v2, 0xd
- if-ne v1, v2, :cond_0
- goto/16 :goto_5
- :cond_0
- const/16 v2, 0x2b
- if-ne v1, v2, :cond_2
- if-eqz p7, :cond_2
- if-eqz p5, :cond_1
- const-string v2, "+"
- goto :goto_1
- :cond_1
- const-string v2, "%2B"
- :goto_1
- invoke-virtual {p0, v2}, Lokio/Buffer;->writeUtf8(Ljava/lang/String;)Lokio/Buffer;
- goto/16 :goto_5
- :cond_2
- const/16 v2, 0x20
- const/16 v3, 0x25
- if-lt v1, v2, :cond_5
- const/16 v2, 0x7f
- if-eq v1, v2, :cond_5
- const/16 v2, 0x80
- if-lt v1, v2, :cond_3
- if-nez p8, :cond_5
- :cond_3
- invoke-virtual {p4, v1}, Ljava/lang/String;->indexOf(I)I
- move-result v2
- const/4 v4, -0x1
- if-ne v2, v4, :cond_5
- if-ne v1, v3, :cond_4
- if-eqz p5, :cond_5
- if-eqz p6, :cond_4
- invoke-static {p1, p2, p3}, Lokhttp3/HttpUrl;->percentEncoded(Ljava/lang/String;II)Z
- move-result v2
- if-nez v2, :cond_4
- goto :goto_2
- :cond_4
- invoke-virtual {p0, v1}, Lokio/Buffer;->writeUtf8CodePoint(I)Lokio/Buffer;
- goto :goto_5
- :cond_5
- :goto_2
- if-nez v0, :cond_6
- new-instance v0, Lokio/Buffer;
- invoke-direct {v0}, Lokio/Buffer;-><init>()V
- :cond_6
- if-eqz p9, :cond_8
- sget-object v2, Lokhttp3/internal/Util;->UTF_8:Ljava/nio/charset/Charset;
- invoke-virtual {p9, v2}, Ljava/nio/charset/Charset;->equals(Ljava/lang/Object;)Z
- move-result v2
- if-eqz v2, :cond_7
- goto :goto_3
- :cond_7
- invoke-static {v1}, Ljava/lang/Character;->charCount(I)I
- move-result v2
- add-int/2addr v2, p2
- invoke-virtual {v0, p1, p2, v2, p9}, Lokio/Buffer;->writeString(Ljava/lang/String;IILjava/nio/charset/Charset;)Lokio/Buffer;
- goto :goto_4
- :cond_8
- :goto_3
- invoke-virtual {v0, v1}, Lokio/Buffer;->writeUtf8CodePoint(I)Lokio/Buffer;
- :goto_4
- invoke-virtual {v0}, Lokio/Buffer;->exhausted()Z
- move-result v2
- if-nez v2, :cond_9
- invoke-virtual {v0}, Lokio/Buffer;->readByte()B
- move-result v2
- and-int/lit16 v2, v2, 0xff
- invoke-virtual {p0, v3}, Lokio/Buffer;->writeByte(I)Lokio/Buffer;
- sget-object v4, Lokhttp3/HttpUrl;->HEX_DIGITS:[C
- shr-int/lit8 v5, v2, 0x4
- and-int/lit8 v5, v5, 0xf
- aget-char v4, v4, v5
- invoke-virtual {p0, v4}, Lokio/Buffer;->writeByte(I)Lokio/Buffer;
- sget-object v4, Lokhttp3/HttpUrl;->HEX_DIGITS:[C
- and-int/lit8 v2, v2, 0xf
- aget-char v2, v4, v2
- invoke-virtual {p0, v2}, Lokio/Buffer;->writeByte(I)Lokio/Buffer;
- goto :goto_4
- :cond_9
- :goto_5
- invoke-static {v1}, Ljava/lang/Character;->charCount(I)I
- move-result v1
- add-int/2addr p2, v1
- goto/16 :goto_0
- :cond_a
- return-void
- .end method
- .method public static defaultPort(Ljava/lang/String;)I
- .locals 1
- const-string v0, "http"
- invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
- move-result v0
- if-eqz v0, :cond_0
- const/16 p0, 0x50
- return p0
- :cond_0
- const-string v0, "https"
- invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
- move-result p0
- if-eqz p0, :cond_1
- const/16 p0, 0x1bb
- return p0
- :cond_1
- const/4 p0, -0x1
- return p0
- .end method
- .method public static get(Ljava/net/URI;)Lokhttp3/HttpUrl;
- .locals 0
- invoke-virtual {p0}, Ljava/net/URI;->toString()Ljava/lang/String;
- move-result-object p0
- invoke-static {p0}, Lokhttp3/HttpUrl;->parse(Ljava/lang/String;)Lokhttp3/HttpUrl;
- move-result-object p0
- return-object p0
- .end method
- .method public static get(Ljava/net/URL;)Lokhttp3/HttpUrl;
- .locals 0
- invoke-virtual {p0}, Ljava/net/URL;->toString()Ljava/lang/String;
- move-result-object p0
- invoke-static {p0}, Lokhttp3/HttpUrl;->parse(Ljava/lang/String;)Lokhttp3/HttpUrl;
- move-result-object p0
- return-object p0
- .end method
- .method static getChecked(Ljava/lang/String;)Lokhttp3/HttpUrl;
- .locals 4
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/net/MalformedURLException;,
- Ljava/net/UnknownHostException;
- }
- .end annotation
- new-instance v0, Lokhttp3/HttpUrl$Builder;
- invoke-direct {v0}, Lokhttp3/HttpUrl$Builder;-><init>()V
- const/4 v1, 0x0
- invoke-virtual {v0, v1, p0}, Lokhttp3/HttpUrl$Builder;->parse(Lokhttp3/HttpUrl;Ljava/lang/String;)Lokhttp3/HttpUrl$Builder$ParseResult;
- move-result-object v1
- sget-object v2, Lokhttp3/HttpUrl$1;->$SwitchMap$okhttp3$HttpUrl$Builder$ParseResult:[I
- invoke-virtual {v1}, Ljava/lang/Enum;->ordinal()I
- move-result v3
- aget v2, v2, v3
- const/4 v3, 0x1
- if-eq v2, v3, :cond_1
- const/4 v0, 0x2
- if-eq v2, v0, :cond_0
- new-instance v0, Ljava/net/MalformedURLException;
- new-instance v2, Ljava/lang/StringBuilder;
- invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
- const-string v3, "Invalid URL: "
- invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
- const-string v1, " for "
- invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- invoke-virtual {v2, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
- move-result-object p0
- invoke-direct {v0, p0}, Ljava/net/MalformedURLException;-><init>(Ljava/lang/String;)V
- throw v0
- :cond_0
- new-instance v0, Ljava/net/UnknownHostException;
- new-instance v1, Ljava/lang/StringBuilder;
- invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
- const-string v2, "Invalid host: "
- invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
- move-result-object p0
- invoke-direct {v0, p0}, Ljava/net/UnknownHostException;-><init>(Ljava/lang/String;)V
- throw v0
- :cond_1
- invoke-virtual {v0}, Lokhttp3/HttpUrl$Builder;->build()Lokhttp3/HttpUrl;
- move-result-object p0
- return-object p0
- .end method
- .method static namesAndValuesToQueryString(Ljava/lang/StringBuilder;Ljava/util/List;)V
- .locals 5
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "(",
- "Ljava/lang/StringBuilder;",
- "Ljava/util/List<",
- "Ljava/lang/String;",
- ">;)V"
- }
- .end annotation
- invoke-interface {p1}, Ljava/util/List;->size()I
- move-result v0
- const/4 v1, 0x0
- :goto_0
- if-ge v1, v0, :cond_2
- invoke-interface {p1, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;
- move-result-object v2
- check-cast v2, Ljava/lang/String;
- add-int/lit8 v3, v1, 0x1
- invoke-interface {p1, v3}, Ljava/util/List;->get(I)Ljava/lang/Object;
- move-result-object v3
- check-cast v3, Ljava/lang/String;
- if-lez v1, :cond_0
- const/16 v4, 0x26
- invoke-virtual {p0, v4}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
- :cond_0
- invoke-virtual {p0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- if-eqz v3, :cond_1
- const/16 v2, 0x3d
- invoke-virtual {p0, v2}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
- invoke-virtual {p0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- :cond_1
- add-int/lit8 v1, v1, 0x2
- goto :goto_0
- :cond_2
- return-void
- .end method
- .method public static parse(Ljava/lang/String;)Lokhttp3/HttpUrl;
- .locals 3
- new-instance v0, Lokhttp3/HttpUrl$Builder;
- invoke-direct {v0}, Lokhttp3/HttpUrl$Builder;-><init>()V
- const/4 v1, 0x0
- invoke-virtual {v0, v1, p0}, Lokhttp3/HttpUrl$Builder;->parse(Lokhttp3/HttpUrl;Ljava/lang/String;)Lokhttp3/HttpUrl$Builder$ParseResult;
- move-result-object p0
- sget-object v2, Lokhttp3/HttpUrl$Builder$ParseResult;->SUCCESS:Lokhttp3/HttpUrl$Builder$ParseResult;
- if-ne p0, v2, :cond_0
- invoke-virtual {v0}, Lokhttp3/HttpUrl$Builder;->build()Lokhttp3/HttpUrl;
- move-result-object v1
- :cond_0
- return-object v1
- .end method
- .method static pathSegmentsToString(Ljava/lang/StringBuilder;Ljava/util/List;)V
- .locals 3
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "(",
- "Ljava/lang/StringBuilder;",
- "Ljava/util/List<",
- "Ljava/lang/String;",
- ">;)V"
- }
- .end annotation
- invoke-interface {p1}, Ljava/util/List;->size()I
- move-result v0
- const/4 v1, 0x0
- :goto_0
- if-ge v1, v0, :cond_0
- const/16 v2, 0x2f
- invoke-virtual {p0, v2}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
- invoke-interface {p1, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;
- move-result-object v2
- check-cast v2, Ljava/lang/String;
- invoke-virtual {p0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- add-int/lit8 v1, v1, 0x1
- goto :goto_0
- :cond_0
- return-void
- .end method
- .method static percentDecode(Ljava/lang/String;IIZ)Ljava/lang/String;
- .locals 3
- move v0, p1
- :goto_0
- if-ge v0, p2, :cond_2
- invoke-virtual {p0, v0}, Ljava/lang/String;->charAt(I)C
- move-result v1
- const/16 v2, 0x25
- if-eq v1, v2, :cond_1
- const/16 v2, 0x2b
- if-ne v1, v2, :cond_0
- if-eqz p3, :cond_0
- goto :goto_1
- :cond_0
- add-int/lit8 v0, v0, 0x1
- goto :goto_0
- :cond_1
- :goto_1
- new-instance v1, Lokio/Buffer;
- invoke-direct {v1}, Lokio/Buffer;-><init>()V
- invoke-virtual {v1, p0, p1, v0}, Lokio/Buffer;->writeUtf8(Ljava/lang/String;II)Lokio/Buffer;
- invoke-static {v1, p0, v0, p2, p3}, Lokhttp3/HttpUrl;->percentDecode(Lokio/Buffer;Ljava/lang/String;IIZ)V
- invoke-virtual {v1}, Lokio/Buffer;->readUtf8()Ljava/lang/String;
- move-result-object p0
- return-object p0
- :cond_2
- invoke-virtual {p0, p1, p2}, Ljava/lang/String;->substring(II)Ljava/lang/String;
- move-result-object p0
- return-object p0
- .end method
- .method static percentDecode(Ljava/lang/String;Z)Ljava/lang/String;
- .locals 2
- invoke-virtual {p0}, Ljava/lang/String;->length()I
- move-result v0
- const/4 v1, 0x0
- invoke-static {p0, v1, v0, p1}, Lokhttp3/HttpUrl;->percentDecode(Ljava/lang/String;IIZ)Ljava/lang/String;
- move-result-object p0
- return-object p0
- .end method
- .method private percentDecode(Ljava/util/List;Z)Ljava/util/List;
- .locals 4
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "(",
- "Ljava/util/List<",
- "Ljava/lang/String;",
- ">;Z)",
- "Ljava/util/List<",
- "Ljava/lang/String;",
- ">;"
- }
- .end annotation
- invoke-interface {p1}, Ljava/util/List;->size()I
- move-result v0
- new-instance v1, Ljava/util/ArrayList;
- invoke-direct {v1, v0}, Ljava/util/ArrayList;-><init>(I)V
- const/4 v2, 0x0
- :goto_0
- if-ge v2, v0, :cond_1
- invoke-interface {p1, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;
- move-result-object v3
- check-cast v3, Ljava/lang/String;
- if-eqz v3, :cond_0
- invoke-static {v3, p2}, Lokhttp3/HttpUrl;->percentDecode(Ljava/lang/String;Z)Ljava/lang/String;
- move-result-object v3
- goto :goto_1
- :cond_0
- const/4 v3, 0x0
- :goto_1
- invoke-interface {v1, v3}, Ljava/util/List;->add(Ljava/lang/Object;)Z
- add-int/lit8 v2, v2, 0x1
- goto :goto_0
- :cond_1
- invoke-static {v1}, Ljava/util/Collections;->unmodifiableList(Ljava/util/List;)Ljava/util/List;
- move-result-object p1
- return-object p1
- .end method
- .method static percentDecode(Lokio/Buffer;Ljava/lang/String;IIZ)V
- .locals 5
- :goto_0
- if-ge p2, p3, :cond_2
- invoke-virtual {p1, p2}, Ljava/lang/String;->codePointAt(I)I
- move-result v0
- const/16 v1, 0x25
- if-ne v0, v1, :cond_0
- add-int/lit8 v1, p2, 0x2
- if-ge v1, p3, :cond_0
- add-int/lit8 v2, p2, 0x1
- invoke-virtual {p1, v2}, Ljava/lang/String;->charAt(I)C
- move-result v2
- invoke-static {v2}, Lokhttp3/internal/Util;->decodeHexDigit(C)I
- move-result v2
- invoke-virtual {p1, v1}, Ljava/lang/String;->charAt(I)C
- move-result v3
- invoke-static {v3}, Lokhttp3/internal/Util;->decodeHexDigit(C)I
- move-result v3
- const/4 v4, -0x1
- if-eq v2, v4, :cond_1
- if-eq v3, v4, :cond_1
- shl-int/lit8 p2, v2, 0x4
- add-int/2addr p2, v3
- invoke-virtual {p0, p2}, Lokio/Buffer;->writeByte(I)Lokio/Buffer;
- move p2, v1
- goto :goto_1
- :cond_0
- const/16 v1, 0x2b
- if-ne v0, v1, :cond_1
- if-eqz p4, :cond_1
- const/16 v1, 0x20
- invoke-virtual {p0, v1}, Lokio/Buffer;->writeByte(I)Lokio/Buffer;
- goto :goto_1
- :cond_1
- invoke-virtual {p0, v0}, Lokio/Buffer;->writeUtf8CodePoint(I)Lokio/Buffer;
- :goto_1
- invoke-static {v0}, Ljava/lang/Character;->charCount(I)I
- move-result v0
- add-int/2addr p2, v0
- goto :goto_0
- :cond_2
- return-void
- .end method
- .method static percentEncoded(Ljava/lang/String;II)Z
- .locals 3
- add-int/lit8 v0, p1, 0x2
- const/4 v1, 0x1
- if-ge v0, p2, :cond_0
- invoke-virtual {p0, p1}, Ljava/lang/String;->charAt(I)C
- move-result p2
- const/16 v2, 0x25
- if-ne p2, v2, :cond_0
- add-int/2addr p1, v1
- invoke-virtual {p0, p1}, Ljava/lang/String;->charAt(I)C
- move-result p1
- invoke-static {p1}, Lokhttp3/internal/Util;->decodeHexDigit(C)I
- move-result p1
- const/4 p2, -0x1
- if-eq p1, p2, :cond_0
- invoke-virtual {p0, v0}, Ljava/lang/String;->charAt(I)C
- move-result p0
- invoke-static {p0}, Lokhttp3/internal/Util;->decodeHexDigit(C)I
- move-result p0
- if-eq p0, p2, :cond_0
- goto :goto_0
- :cond_0
- const/4 v1, 0x0
- :goto_0
- return v1
- .end method
- .method static queryStringToNamesAndValues(Ljava/lang/String;)Ljava/util/List;
- .locals 5
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "(",
- "Ljava/lang/String;",
- ")",
- "Ljava/util/List<",
- "Ljava/lang/String;",
- ">;"
- }
- .end annotation
- new-instance v0, Ljava/util/ArrayList;
- invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
- const/4 v1, 0x0
- :goto_0
- invoke-virtual {p0}, Ljava/lang/String;->length()I
- move-result v2
- if-gt v1, v2, :cond_3
- const/16 v2, 0x26
- invoke-virtual {p0, v2, v1}, Ljava/lang/String;->indexOf(II)I
- move-result v2
- const/4 v3, -0x1
- if-ne v2, v3, :cond_0
- invoke-virtual {p0}, Ljava/lang/String;->length()I
- move-result v2
- :cond_0
- const/16 v4, 0x3d
- invoke-virtual {p0, v4, v1}, Ljava/lang/String;->indexOf(II)I
- move-result v4
- if-eq v4, v3, :cond_2
- if-le v4, v2, :cond_1
- goto :goto_1
- :cond_1
- invoke-virtual {p0, v1, v4}, Ljava/lang/String;->substring(II)Ljava/lang/String;
- move-result-object v1
- invoke-interface {v0, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
- add-int/lit8 v4, v4, 0x1
- invoke-virtual {p0, v4, v2}, Ljava/lang/String;->substring(II)Ljava/lang/String;
- move-result-object v1
- goto :goto_2
- :cond_2
- :goto_1
- invoke-virtual {p0, v1, v2}, Ljava/lang/String;->substring(II)Ljava/lang/String;
- move-result-object v1
- invoke-interface {v0, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
- const/4 v1, 0x0
- :goto_2
- invoke-interface {v0, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
- add-int/lit8 v1, v2, 0x1
- goto :goto_0
- :cond_3
- return-object v0
- .end method
- # virtual methods
- .method public encodedFragment()Ljava/lang/String;
- .locals 2
- iget-object v0, p0, Lokhttp3/HttpUrl;->fragment:Ljava/lang/String;
- if-nez v0, :cond_0
- const/4 v0, 0x0
- return-object v0
- :cond_0
- iget-object v0, p0, Lokhttp3/HttpUrl;->url:Ljava/lang/String;
- const/16 v1, 0x23
- invoke-virtual {v0, v1}, Ljava/lang/String;->indexOf(I)I
- move-result v0
- add-int/lit8 v0, v0, 0x1
- iget-object v1, p0, Lokhttp3/HttpUrl;->url:Ljava/lang/String;
- invoke-virtual {v1, v0}, Ljava/lang/String;->substring(I)Ljava/lang/String;
- move-result-object v0
- return-object v0
- .end method
- .method public encodedPassword()Ljava/lang/String;
- .locals 3
- iget-object v0, p0, Lokhttp3/HttpUrl;->password:Ljava/lang/String;
- invoke-virtual {v0}, Ljava/lang/String;->isEmpty()Z
- move-result v0
- if-eqz v0, :cond_0
- const-string v0, ""
- return-object v0
- :cond_0
- iget-object v0, p0, Lokhttp3/HttpUrl;->url:Ljava/lang/String;
- const/16 v1, 0x3a
- iget-object v2, p0, Lokhttp3/HttpUrl;->scheme:Ljava/lang/String;
- invoke-virtual {v2}, Ljava/lang/String;->length()I
- move-result v2
- add-int/lit8 v2, v2, 0x3
- invoke-virtual {v0, v1, v2}, Ljava/lang/String;->indexOf(II)I
- move-result v0
- add-int/lit8 v0, v0, 0x1
- iget-object v1, p0, Lokhttp3/HttpUrl;->url:Ljava/lang/String;
- const/16 v2, 0x40
- invoke-virtual {v1, v2}, Ljava/lang/String;->indexOf(I)I
- move-result v1
- iget-object v2, p0, Lokhttp3/HttpUrl;->url:Ljava/lang/String;
- invoke-virtual {v2, v0, v1}, Ljava/lang/String;->substring(II)Ljava/lang/String;
- move-result-object v0
- return-object v0
- .end method
- .method public encodedPath()Ljava/lang/String;
- .locals 4
- iget-object v0, p0, Lokhttp3/HttpUrl;->url:Ljava/lang/String;
- iget-object v1, p0, Lokhttp3/HttpUrl;->scheme:Ljava/lang/String;
- invoke-virtual {v1}, Ljava/lang/String;->length()I
- move-result v1
- add-int/lit8 v1, v1, 0x3
- const/16 v2, 0x2f
- invoke-virtual {v0, v2, v1}, Ljava/lang/String;->indexOf(II)I
- move-result v0
- iget-object v1, p0, Lokhttp3/HttpUrl;->url:Ljava/lang/String;
- invoke-virtual {v1}, Ljava/lang/String;->length()I
- move-result v2
- const-string v3, "?#"
- invoke-static {v1, v0, v2, v3}, Lokhttp3/internal/Util;->delimiterOffset(Ljava/lang/String;IILjava/lang/String;)I
- move-result v1
- iget-object v2, p0, Lokhttp3/HttpUrl;->url:Ljava/lang/String;
- invoke-virtual {v2, v0, v1}, Ljava/lang/String;->substring(II)Ljava/lang/String;
- move-result-object v0
- return-object v0
- .end method
- .method public encodedPathSegments()Ljava/util/List;
- .locals 6
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "()",
- "Ljava/util/List<",
- "Ljava/lang/String;",
- ">;"
- }
- .end annotation
- iget-object v0, p0, Lokhttp3/HttpUrl;->url:Ljava/lang/String;
- iget-object v1, p0, Lokhttp3/HttpUrl;->scheme:Ljava/lang/String;
- invoke-virtual {v1}, Ljava/lang/String;->length()I
- move-result v1
- add-int/lit8 v1, v1, 0x3
- const/16 v2, 0x2f
- invoke-virtual {v0, v2, v1}, Ljava/lang/String;->indexOf(II)I
- move-result v0
- iget-object v1, p0, Lokhttp3/HttpUrl;->url:Ljava/lang/String;
- invoke-virtual {v1}, Ljava/lang/String;->length()I
- move-result v3
- const-string v4, "?#"
- invoke-static {v1, v0, v3, v4}, Lokhttp3/internal/Util;->delimiterOffset(Ljava/lang/String;IILjava/lang/String;)I
- move-result v1
- new-instance v3, Ljava/util/ArrayList;
- invoke-direct {v3}, Ljava/util/ArrayList;-><init>()V
- :goto_0
- if-ge v0, v1, :cond_0
- add-int/lit8 v0, v0, 0x1
- iget-object v4, p0, Lokhttp3/HttpUrl;->url:Ljava/lang/String;
- invoke-static {v4, v0, v1, v2}, Lokhttp3/internal/Util;->delimiterOffset(Ljava/lang/String;IIC)I
- move-result v4
- iget-object v5, p0, Lokhttp3/HttpUrl;->url:Ljava/lang/String;
- invoke-virtual {v5, v0, v4}, Ljava/lang/String;->substring(II)Ljava/lang/String;
- move-result-object v0
- invoke-interface {v3, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z
- move v0, v4
- goto :goto_0
- :cond_0
- return-object v3
- .end method
- .method public encodedQuery()Ljava/lang/String;
- .locals 5
- iget-object v0, p0, Lokhttp3/HttpUrl;->queryNamesAndValues:Ljava/util/List;
- if-nez v0, :cond_0
- const/4 v0, 0x0
- return-object v0
- :cond_0
- iget-object v0, p0, Lokhttp3/HttpUrl;->url:Ljava/lang/String;
- const/16 v1, 0x3f
- invoke-virtual {v0, v1}, Ljava/lang/String;->indexOf(I)I
- move-result v0
- add-int/lit8 v0, v0, 0x1
- iget-object v1, p0, Lokhttp3/HttpUrl;->url:Ljava/lang/String;
- add-int/lit8 v2, v0, 0x1
- invoke-virtual {v1}, Ljava/lang/String;->length()I
- move-result v3
- const/16 v4, 0x23
- invoke-static {v1, v2, v3, v4}, Lokhttp3/internal/Util;->delimiterOffset(Ljava/lang/String;IIC)I
- move-result v1
- iget-object v2, p0, Lokhttp3/HttpUrl;->url:Ljava/lang/String;
- invoke-virtual {v2, v0, v1}, Ljava/lang/String;->substring(II)Ljava/lang/String;
- move-result-object v0
- return-object v0
- .end method
- .method public encodedUsername()Ljava/lang/String;
- .locals 4
- iget-object v0, p0, Lokhttp3/HttpUrl;->username:Ljava/lang/String;
- invoke-virtual {v0}, Ljava/lang/String;->isEmpty()Z
- move-result v0
- if-eqz v0, :cond_0
- const-string v0, ""
- return-object v0
- :cond_0
- iget-object v0, p0, Lokhttp3/HttpUrl;->scheme:Ljava/lang/String;
- invoke-virtual {v0}, Ljava/lang/String;->length()I
- move-result v0
- add-int/lit8 v0, v0, 0x3
- iget-object v1, p0, Lokhttp3/HttpUrl;->url:Ljava/lang/String;
- invoke-virtual {v1}, Ljava/lang/String;->length()I
- move-result v2
- const-string v3, ":@"
- invoke-static {v1, v0, v2, v3}, Lokhttp3/internal/Util;->delimiterOffset(Ljava/lang/String;IILjava/lang/String;)I
- move-result v1
- iget-object v2, p0, Lokhttp3/HttpUrl;->url:Ljava/lang/String;
- invoke-virtual {v2, v0, v1}, Ljava/lang/String;->substring(II)Ljava/lang/String;
- move-result-object v0
- return-object v0
- .end method
- .method public equals(Ljava/lang/Object;)Z
- .locals 1
- instance-of v0, p1, Lokhttp3/HttpUrl;
- if-eqz v0, :cond_0
- check-cast p1, Lokhttp3/HttpUrl;
- iget-object p1, p1, Lokhttp3/HttpUrl;->url:Ljava/lang/String;
- iget-object v0, p0, Lokhttp3/HttpUrl;->url:Ljava/lang/String;
- invoke-virtual {p1, v0}, Ljava/lang/String;->equals(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 fragment()Ljava/lang/String;
- .locals 1
- iget-object v0, p0, Lokhttp3/HttpUrl;->fragment:Ljava/lang/String;
- return-object v0
- .end method
- .method public hashCode()I
- .locals 1
- iget-object v0, p0, Lokhttp3/HttpUrl;->url:Ljava/lang/String;
- invoke-virtual {v0}, Ljava/lang/String;->hashCode()I
- move-result v0
- return v0
- .end method
- .method public host()Ljava/lang/String;
- .locals 1
- iget-object v0, p0, Lokhttp3/HttpUrl;->host:Ljava/lang/String;
- return-object v0
- .end method
- .method public isHttps()Z
- .locals 2
- iget-object v0, p0, Lokhttp3/HttpUrl;->scheme:Ljava/lang/String;
- const-string v1, "https"
- invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
- move-result v0
- return v0
- .end method
- .method public newBuilder()Lokhttp3/HttpUrl$Builder;
- .locals 3
- new-instance v0, Lokhttp3/HttpUrl$Builder;
- invoke-direct {v0}, Lokhttp3/HttpUrl$Builder;-><init>()V
- iget-object v1, p0, Lokhttp3/HttpUrl;->scheme:Ljava/lang/String;
- iput-object v1, v0, Lokhttp3/HttpUrl$Builder;->scheme:Ljava/lang/String;
- invoke-virtual {p0}, Lokhttp3/HttpUrl;->encodedUsername()Ljava/lang/String;
- move-result-object v1
- iput-object v1, v0, Lokhttp3/HttpUrl$Builder;->encodedUsername:Ljava/lang/String;
- invoke-virtual {p0}, Lokhttp3/HttpUrl;->encodedPassword()Ljava/lang/String;
- move-result-object v1
- iput-object v1, v0, Lokhttp3/HttpUrl$Builder;->encodedPassword:Ljava/lang/String;
- iget-object v1, p0, Lokhttp3/HttpUrl;->host:Ljava/lang/String;
- iput-object v1, v0, Lokhttp3/HttpUrl$Builder;->host:Ljava/lang/String;
- iget v1, p0, Lokhttp3/HttpUrl;->port:I
- iget-object v2, p0, Lokhttp3/HttpUrl;->scheme:Ljava/lang/String;
- invoke-static {v2}, Lokhttp3/HttpUrl;->defaultPort(Ljava/lang/String;)I
- move-result v2
- if-eq v1, v2, :cond_0
- iget v1, p0, Lokhttp3/HttpUrl;->port:I
- goto :goto_0
- :cond_0
- const/4 v1, -0x1
- :goto_0
- iput v1, v0, Lokhttp3/HttpUrl$Builder;->port:I
- iget-object v1, v0, Lokhttp3/HttpUrl$Builder;->encodedPathSegments:Ljava/util/List;
- invoke-interface {v1}, Ljava/util/List;->clear()V
- iget-object v1, v0, Lokhttp3/HttpUrl$Builder;->encodedPathSegments:Ljava/util/List;
- invoke-virtual {p0}, Lokhttp3/HttpUrl;->encodedPathSegments()Ljava/util/List;
- move-result-object v2
- invoke-interface {v1, v2}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z
- invoke-virtual {p0}, Lokhttp3/HttpUrl;->encodedQuery()Ljava/lang/String;
- move-result-object v1
- invoke-virtual {v0, v1}, Lokhttp3/HttpUrl$Builder;->encodedQuery(Ljava/lang/String;)Lokhttp3/HttpUrl$Builder;
- invoke-virtual {p0}, Lokhttp3/HttpUrl;->encodedFragment()Ljava/lang/String;
- move-result-object v1
- iput-object v1, v0, Lokhttp3/HttpUrl$Builder;->encodedFragment:Ljava/lang/String;
- return-object v0
- .end method
- .method public newBuilder(Ljava/lang/String;)Lokhttp3/HttpUrl$Builder;
- .locals 2
- new-instance v0, Lokhttp3/HttpUrl$Builder;
- invoke-direct {v0}, Lokhttp3/HttpUrl$Builder;-><init>()V
- invoke-virtual {v0, p0, p1}, Lokhttp3/HttpUrl$Builder;->parse(Lokhttp3/HttpUrl;Ljava/lang/String;)Lokhttp3/HttpUrl$Builder$ParseResult;
- move-result-object p1
- sget-object v1, Lokhttp3/HttpUrl$Builder$ParseResult;->SUCCESS:Lokhttp3/HttpUrl$Builder$ParseResult;
- if-ne p1, v1, :cond_0
- goto :goto_0
- :cond_0
- const/4 v0, 0x0
- :goto_0
- return-object v0
- .end method
- .method public password()Ljava/lang/String;
- .locals 1
- iget-object v0, p0, Lokhttp3/HttpUrl;->password:Ljava/lang/String;
- return-object v0
- .end method
- .method public pathSegments()Ljava/util/List;
- .locals 1
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "()",
- "Ljava/util/List<",
- "Ljava/lang/String;",
- ">;"
- }
- .end annotation
- iget-object v0, p0, Lokhttp3/HttpUrl;->pathSegments:Ljava/util/List;
- return-object v0
- .end method
- .method public pathSize()I
- .locals 1
- iget-object v0, p0, Lokhttp3/HttpUrl;->pathSegments:Ljava/util/List;
- invoke-interface {v0}, Ljava/util/List;->size()I
- move-result v0
- return v0
- .end method
- .method public port()I
- .locals 1
- iget v0, p0, Lokhttp3/HttpUrl;->port:I
- return v0
- .end method
- .method public query()Ljava/lang/String;
- .locals 2
- iget-object v0, p0, Lokhttp3/HttpUrl;->queryNamesAndValues:Ljava/util/List;
- if-nez v0, :cond_0
- const/4 v0, 0x0
- return-object v0
- :cond_0
- new-instance v0, Ljava/lang/StringBuilder;
- invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
- iget-object v1, p0, Lokhttp3/HttpUrl;->queryNamesAndValues:Ljava/util/List;
- invoke-static {v0, v1}, Lokhttp3/HttpUrl;->namesAndValuesToQueryString(Ljava/lang/StringBuilder;Ljava/util/List;)V
- invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
- move-result-object v0
- return-object v0
- .end method
- .method public queryParameter(Ljava/lang/String;)Ljava/lang/String;
- .locals 4
- iget-object v0, p0, Lokhttp3/HttpUrl;->queryNamesAndValues:Ljava/util/List;
- const/4 v1, 0x0
- if-nez v0, :cond_0
- return-object v1
- :cond_0
- const/4 v2, 0x0
- invoke-interface {v0}, Ljava/util/List;->size()I
- move-result v0
- :goto_0
- if-ge v2, v0, :cond_2
- iget-object v3, p0, Lokhttp3/HttpUrl;->queryNamesAndValues:Ljava/util/List;
- invoke-interface {v3, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;
- move-result-object v3
- invoke-virtual {p1, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
- move-result v3
- if-eqz v3, :cond_1
- iget-object p1, p0, Lokhttp3/HttpUrl;->queryNamesAndValues:Ljava/util/List;
- add-int/lit8 v2, v2, 0x1
- invoke-interface {p1, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;
- move-result-object p1
- check-cast p1, Ljava/lang/String;
- return-object p1
- :cond_1
- add-int/lit8 v2, v2, 0x2
- goto :goto_0
- :cond_2
- return-object v1
- .end method
- .method public queryParameterName(I)Ljava/lang/String;
- .locals 1
- iget-object v0, p0, Lokhttp3/HttpUrl;->queryNamesAndValues:Ljava/util/List;
- if-eqz v0, :cond_0
- mul-int/lit8 p1, p1, 0x2
- invoke-interface {v0, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;
- move-result-object p1
- check-cast p1, Ljava/lang/String;
- return-object p1
- :cond_0
- new-instance p1, Ljava/lang/IndexOutOfBoundsException;
- invoke-direct {p1}, Ljava/lang/IndexOutOfBoundsException;-><init>()V
- throw p1
- .end method
- .method public queryParameterNames()Ljava/util/Set;
- .locals 4
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "()",
- "Ljava/util/Set<",
- "Ljava/lang/String;",
- ">;"
- }
- .end annotation
- iget-object v0, p0, Lokhttp3/HttpUrl;->queryNamesAndValues:Ljava/util/List;
- if-nez v0, :cond_0
- invoke-static {}, Ljava/util/Collections;->emptySet()Ljava/util/Set;
- move-result-object v0
- return-object v0
- :cond_0
- new-instance v0, Ljava/util/LinkedHashSet;
- invoke-direct {v0}, Ljava/util/LinkedHashSet;-><init>()V
- const/4 v1, 0x0
- iget-object v2, p0, Lokhttp3/HttpUrl;->queryNamesAndValues:Ljava/util/List;
- invoke-interface {v2}, Ljava/util/List;->size()I
- move-result v2
- :goto_0
- if-ge v1, v2, :cond_1
- iget-object v3, p0, Lokhttp3/HttpUrl;->queryNamesAndValues:Ljava/util/List;
- invoke-interface {v3, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;
- move-result-object v3
- invoke-interface {v0, v3}, Ljava/util/Set;->add(Ljava/lang/Object;)Z
- add-int/lit8 v1, v1, 0x2
- goto :goto_0
- :cond_1
- invoke-static {v0}, Ljava/util/Collections;->unmodifiableSet(Ljava/util/Set;)Ljava/util/Set;
- move-result-object v0
- return-object v0
- .end method
- .method public queryParameterValue(I)Ljava/lang/String;
- .locals 1
- iget-object v0, p0, Lokhttp3/HttpUrl;->queryNamesAndValues:Ljava/util/List;
- if-eqz v0, :cond_0
- mul-int/lit8 p1, p1, 0x2
- add-int/lit8 p1, p1, 0x1
- invoke-interface {v0, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;
- move-result-object p1
- check-cast p1, Ljava/lang/String;
- return-object p1
- :cond_0
- new-instance p1, Ljava/lang/IndexOutOfBoundsException;
- invoke-direct {p1}, Ljava/lang/IndexOutOfBoundsException;-><init>()V
- throw p1
- .end method
- .method public queryParameterValues(Ljava/lang/String;)Ljava/util/List;
- .locals 5
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "(",
- "Ljava/lang/String;",
- ")",
- "Ljava/util/List<",
- "Ljava/lang/String;",
- ">;"
- }
- .end annotation
- iget-object v0, p0, Lokhttp3/HttpUrl;->queryNamesAndValues:Ljava/util/List;
- if-nez v0, :cond_0
- invoke-static {}, Ljava/util/Collections;->emptyList()Ljava/util/List;
- move-result-object p1
- return-object p1
- :cond_0
- new-instance v0, Ljava/util/ArrayList;
- invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
- const/4 v1, 0x0
- iget-object v2, p0, Lokhttp3/HttpUrl;->queryNamesAndValues:Ljava/util/List;
- invoke-interface {v2}, Ljava/util/List;->size()I
- move-result v2
- :goto_0
- if-ge v1, v2, :cond_2
- iget-object v3, p0, Lokhttp3/HttpUrl;->queryNamesAndValues:Ljava/util/List;
- invoke-interface {v3, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;
- move-result-object v3
- invoke-virtual {p1, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
- move-result v3
- if-eqz v3, :cond_1
- iget-object v3, p0, Lokhttp3/HttpUrl;->queryNamesAndValues:Ljava/util/List;
- add-int/lit8 v4, v1, 0x1
- invoke-interface {v3, v4}, Ljava/util/List;->get(I)Ljava/lang/Object;
- move-result-object v3
- invoke-interface {v0, v3}, Ljava/util/List;->add(Ljava/lang/Object;)Z
- :cond_1
- add-int/lit8 v1, v1, 0x2
- goto :goto_0
- :cond_2
- invoke-static {v0}, Ljava/util/Collections;->unmodifiableList(Ljava/util/List;)Ljava/util/List;
- move-result-object p1
- return-object p1
- .end method
- .method public querySize()I
- .locals 1
- iget-object v0, p0, Lokhttp3/HttpUrl;->queryNamesAndValues:Ljava/util/List;
- if-eqz v0, :cond_0
- invoke-interface {v0}, Ljava/util/List;->size()I
- move-result v0
- div-int/lit8 v0, v0, 0x2
- goto :goto_0
- :cond_0
- const/4 v0, 0x0
- :goto_0
- return v0
- .end method
- .method public redact()Ljava/lang/String;
- .locals 2
- const-string v0, "/..."
- invoke-virtual {p0, v0}, Lokhttp3/HttpUrl;->newBuilder(Ljava/lang/String;)Lokhttp3/HttpUrl$Builder;
- move-result-object v0
- const-string v1, ""
- invoke-virtual {v0, v1}, Lokhttp3/HttpUrl$Builder;->username(Ljava/lang/String;)Lokhttp3/HttpUrl$Builder;
- move-result-object v0
- invoke-virtual {v0, v1}, Lokhttp3/HttpUrl$Builder;->password(Ljava/lang/String;)Lokhttp3/HttpUrl$Builder;
- move-result-object v0
- invoke-virtual {v0}, Lokhttp3/HttpUrl$Builder;->build()Lokhttp3/HttpUrl;
- move-result-object v0
- invoke-virtual {v0}, Lokhttp3/HttpUrl;->toString()Ljava/lang/String;
- move-result-object v0
- return-object v0
- .end method
- .method public resolve(Ljava/lang/String;)Lokhttp3/HttpUrl;
- .locals 0
- invoke-virtual {p0, p1}, Lokhttp3/HttpUrl;->newBuilder(Ljava/lang/String;)Lokhttp3/HttpUrl$Builder;
- move-result-object p1
- if-eqz p1, :cond_0
- invoke-virtual {p1}, Lokhttp3/HttpUrl$Builder;->build()Lokhttp3/HttpUrl;
- move-result-object p1
- goto :goto_0
- :cond_0
- const/4 p1, 0x0
- :goto_0
- return-object p1
- .end method
- .method public scheme()Ljava/lang/String;
- .locals 1
- iget-object v0, p0, Lokhttp3/HttpUrl;->scheme:Ljava/lang/String;
- return-object v0
- .end method
- .method public toString()Ljava/lang/String;
- .locals 1
- iget-object v0, p0, Lokhttp3/HttpUrl;->url:Ljava/lang/String;
- return-object v0
- .end method
- .method public topPrivateDomain()Ljava/lang/String;
- .locals 2
- iget-object v0, p0, Lokhttp3/HttpUrl;->host:Ljava/lang/String;
- invoke-static {v0}, Lokhttp3/internal/Util;->verifyAsIpAddress(Ljava/lang/String;)Z
- move-result v0
- if-eqz v0, :cond_0
- const/4 v0, 0x0
- return-object v0
- :cond_0
- invoke-static {}, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->get()Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;
- move-result-object v0
- iget-object v1, p0, Lokhttp3/HttpUrl;->host:Ljava/lang/String;
- invoke-virtual {v0, v1}, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->getEffectiveTldPlusOne(Ljava/lang/String;)Ljava/lang/String;
- move-result-object v0
- return-object v0
- .end method
- .method public uri()Ljava/net/URI;
- .locals 4
- invoke-virtual {p0}, Lokhttp3/HttpUrl;->newBuilder()Lokhttp3/HttpUrl$Builder;
- move-result-object v0
- invoke-virtual {v0}, Lokhttp3/HttpUrl$Builder;->reencodeForUri()Lokhttp3/HttpUrl$Builder;
- move-result-object v0
- invoke-virtual {v0}, Lokhttp3/HttpUrl$Builder;->toString()Ljava/lang/String;
- move-result-object v0
- :try_start_0
- new-instance v1, Ljava/net/URI;
- invoke-direct {v1, v0}, Ljava/net/URI;-><init>(Ljava/lang/String;)V
- :try_end_0
- .catch Ljava/net/URISyntaxException; {:try_start_0 .. :try_end_0} :catch_0
- return-object v1
- :catch_0
- move-exception v1
- :try_start_1
- const-string v2, "[\\u0000-\\u001F\\u007F-\\u009F\\p{javaWhitespace}]"
- const-string v3, ""
- invoke-virtual {v0, v2, v3}, Ljava/lang/String;->replaceAll(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
- move-result-object v0
- invoke-static {v0}, Ljava/net/URI;->create(Ljava/lang/String;)Ljava/net/URI;
- move-result-object v0
- :try_end_1
- .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_1
- return-object v0
- :catch_1
- new-instance v0, Ljava/lang/RuntimeException;
- invoke-direct {v0, v1}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/Throwable;)V
- throw v0
- .end method
- .method public url()Ljava/net/URL;
- .locals 2
- :try_start_0
- new-instance v0, Ljava/net/URL;
- iget-object v1, p0, Lokhttp3/HttpUrl;->url:Ljava/lang/String;
- invoke-direct {v0, v1}, Ljava/net/URL;-><init>(Ljava/lang/String;)V
- :try_end_0
- .catch Ljava/net/MalformedURLException; {:try_start_0 .. :try_end_0} :catch_0
- return-object v0
- :catch_0
- move-exception v0
- new-instance v1, Ljava/lang/RuntimeException;
- invoke-direct {v1, v0}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/Throwable;)V
- throw v1
- .end method
- .method public username()Ljava/lang/String;
- .locals 1
- iget-object v0, p0, Lokhttp3/HttpUrl;->username:Ljava/lang/String;
- return-object v0
- .end method
|