HttpUrl$Builder.smali 57 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648
  1. .class public final Lokhttp3/HttpUrl$Builder;
  2. .super Ljava/lang/Object;
  3. .source ""
  4. # annotations
  5. .annotation system Ldalvik/annotation/EnclosingClass;
  6. value = Lokhttp3/HttpUrl;
  7. .end annotation
  8. .annotation system Ldalvik/annotation/InnerClass;
  9. accessFlags = 0x19
  10. name = "Builder"
  11. .end annotation
  12. .annotation system Ldalvik/annotation/MemberClasses;
  13. value = {
  14. Lokhttp3/HttpUrl$Builder$ParseResult;
  15. }
  16. .end annotation
  17. # instance fields
  18. .field encodedFragment:Ljava/lang/String;
  19. .field encodedPassword:Ljava/lang/String;
  20. .field final encodedPathSegments:Ljava/util/List;
  21. .annotation system Ldalvik/annotation/Signature;
  22. value = {
  23. "Ljava/util/List<",
  24. "Ljava/lang/String;",
  25. ">;"
  26. }
  27. .end annotation
  28. .end field
  29. .field encodedQueryNamesAndValues:Ljava/util/List;
  30. .annotation system Ldalvik/annotation/Signature;
  31. value = {
  32. "Ljava/util/List<",
  33. "Ljava/lang/String;",
  34. ">;"
  35. }
  36. .end annotation
  37. .end field
  38. .field encodedUsername:Ljava/lang/String;
  39. .field host:Ljava/lang/String;
  40. .field port:I
  41. .field scheme:Ljava/lang/String;
  42. # direct methods
  43. .method public constructor <init>()V
  44. .locals 2
  45. invoke-direct {p0}, Ljava/lang/Object;-><init>()V
  46. const-string v0, ""
  47. iput-object v0, p0, Lokhttp3/HttpUrl$Builder;->encodedUsername:Ljava/lang/String;
  48. iput-object v0, p0, Lokhttp3/HttpUrl$Builder;->encodedPassword:Ljava/lang/String;
  49. const/4 v1, -0x1
  50. iput v1, p0, Lokhttp3/HttpUrl$Builder;->port:I
  51. new-instance v1, Ljava/util/ArrayList;
  52. invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V
  53. iput-object v1, p0, Lokhttp3/HttpUrl$Builder;->encodedPathSegments:Ljava/util/List;
  54. iget-object v1, p0, Lokhttp3/HttpUrl$Builder;->encodedPathSegments:Ljava/util/List;
  55. invoke-interface {v1, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  56. return-void
  57. .end method
  58. .method private addPathSegments(Ljava/lang/String;Z)Lokhttp3/HttpUrl$Builder;
  59. .locals 8
  60. const/4 v0, 0x0
  61. const/4 v3, 0x0
  62. :cond_0
  63. invoke-virtual {p1}, Ljava/lang/String;->length()I
  64. move-result v1
  65. const-string v2, "/\\"
  66. invoke-static {p1, v3, v1, v2}, Lokhttp3/internal/Util;->delimiterOffset(Ljava/lang/String;IILjava/lang/String;)I
  67. move-result v7
  68. invoke-virtual {p1}, Ljava/lang/String;->length()I
  69. move-result v1
  70. if-ge v7, v1, :cond_1
  71. const/4 v1, 0x1
  72. const/4 v5, 0x1
  73. goto :goto_0
  74. :cond_1
  75. const/4 v5, 0x0
  76. :goto_0
  77. move-object v1, p0
  78. move-object v2, p1
  79. move v4, v7
  80. move v6, p2
  81. invoke-direct/range {v1 .. v6}, Lokhttp3/HttpUrl$Builder;->push(Ljava/lang/String;IIZZ)V
  82. add-int/lit8 v3, v7, 0x1
  83. invoke-virtual {p1}, Ljava/lang/String;->length()I
  84. move-result v1
  85. if-le v3, v1, :cond_0
  86. return-object p0
  87. .end method
  88. .method private static canonicalizeHost(Ljava/lang/String;II)Ljava/lang/String;
  89. .locals 1
  90. const/4 v0, 0x0
  91. invoke-static {p0, p1, p2, v0}, Lokhttp3/HttpUrl;->percentDecode(Ljava/lang/String;IIZ)Ljava/lang/String;
  92. move-result-object p0
  93. invoke-static {p0}, Lokhttp3/internal/Util;->canonicalizeHost(Ljava/lang/String;)Ljava/lang/String;
  94. move-result-object p0
  95. return-object p0
  96. .end method
  97. .method private isDot(Ljava/lang/String;)Z
  98. .locals 1
  99. const-string v0, "."
  100. invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
  101. move-result v0
  102. if-nez v0, :cond_1
  103. const-string v0, "%2e"
  104. invoke-virtual {p1, v0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
  105. move-result p1
  106. if-eqz p1, :cond_0
  107. goto :goto_0
  108. :cond_0
  109. const/4 p1, 0x0
  110. goto :goto_1
  111. :cond_1
  112. :goto_0
  113. const/4 p1, 0x1
  114. :goto_1
  115. return p1
  116. .end method
  117. .method private isDotDot(Ljava/lang/String;)Z
  118. .locals 1
  119. const-string v0, ".."
  120. invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
  121. move-result v0
  122. if-nez v0, :cond_1
  123. const-string v0, "%2e."
  124. invoke-virtual {p1, v0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
  125. move-result v0
  126. if-nez v0, :cond_1
  127. const-string v0, ".%2e"
  128. invoke-virtual {p1, v0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
  129. move-result v0
  130. if-nez v0, :cond_1
  131. const-string v0, "%2e%2e"
  132. invoke-virtual {p1, v0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
  133. move-result p1
  134. if-eqz p1, :cond_0
  135. goto :goto_0
  136. :cond_0
  137. const/4 p1, 0x0
  138. goto :goto_1
  139. :cond_1
  140. :goto_0
  141. const/4 p1, 0x1
  142. :goto_1
  143. return p1
  144. .end method
  145. .method private static parsePort(Ljava/lang/String;II)I
  146. .locals 10
  147. const/4 v0, -0x1
  148. :try_start_0
  149. const-string v4, ""
  150. const/4 v5, 0x0
  151. const/4 v6, 0x0
  152. const/4 v7, 0x0
  153. const/4 v8, 0x1
  154. const/4 v9, 0x0
  155. move-object v1, p0
  156. move v2, p1
  157. move v3, p2
  158. invoke-static/range {v1 .. v9}, Lokhttp3/HttpUrl;->canonicalize(Ljava/lang/String;IILjava/lang/String;ZZZZLjava/nio/charset/Charset;)Ljava/lang/String;
  159. move-result-object p0
  160. invoke-static {p0}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I
  161. move-result p0
  162. :try_end_0
  163. .catch Ljava/lang/NumberFormatException; {:try_start_0 .. :try_end_0} :catch_0
  164. if-lez p0, :cond_0
  165. const p1, 0xffff
  166. if-gt p0, p1, :cond_0
  167. return p0
  168. :catch_0
  169. :cond_0
  170. return v0
  171. .end method
  172. .method private pop()V
  173. .locals 3
  174. iget-object v0, p0, Lokhttp3/HttpUrl$Builder;->encodedPathSegments:Ljava/util/List;
  175. invoke-interface {v0}, Ljava/util/List;->size()I
  176. move-result v1
  177. add-int/lit8 v1, v1, -0x1
  178. invoke-interface {v0, v1}, Ljava/util/List;->remove(I)Ljava/lang/Object;
  179. move-result-object v0
  180. check-cast v0, Ljava/lang/String;
  181. invoke-virtual {v0}, Ljava/lang/String;->isEmpty()Z
  182. move-result v0
  183. const-string v1, ""
  184. if-eqz v0, :cond_0
  185. iget-object v0, p0, Lokhttp3/HttpUrl$Builder;->encodedPathSegments:Ljava/util/List;
  186. invoke-interface {v0}, Ljava/util/List;->isEmpty()Z
  187. move-result v0
  188. if-nez v0, :cond_0
  189. iget-object v0, p0, Lokhttp3/HttpUrl$Builder;->encodedPathSegments:Ljava/util/List;
  190. invoke-interface {v0}, Ljava/util/List;->size()I
  191. move-result v2
  192. add-int/lit8 v2, v2, -0x1
  193. invoke-interface {v0, v2, v1}, Ljava/util/List;->set(ILjava/lang/Object;)Ljava/lang/Object;
  194. goto :goto_0
  195. :cond_0
  196. iget-object v0, p0, Lokhttp3/HttpUrl$Builder;->encodedPathSegments:Ljava/util/List;
  197. invoke-interface {v0, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  198. :goto_0
  199. return-void
  200. .end method
  201. .method private static portColonOffset(Ljava/lang/String;II)I
  202. .locals 2
  203. :goto_0
  204. if-ge p1, p2, :cond_3
  205. invoke-virtual {p0, p1}, Ljava/lang/String;->charAt(I)C
  206. move-result v0
  207. const/16 v1, 0x3a
  208. if-eq v0, v1, :cond_2
  209. const/16 v1, 0x5b
  210. if-eq v0, v1, :cond_0
  211. goto :goto_1
  212. :cond_0
  213. add-int/lit8 p1, p1, 0x1
  214. if-ge p1, p2, :cond_1
  215. invoke-virtual {p0, p1}, Ljava/lang/String;->charAt(I)C
  216. move-result v0
  217. const/16 v1, 0x5d
  218. if-ne v0, v1, :cond_0
  219. :cond_1
  220. :goto_1
  221. add-int/lit8 p1, p1, 0x1
  222. goto :goto_0
  223. :cond_2
  224. return p1
  225. :cond_3
  226. return p2
  227. .end method
  228. .method private push(Ljava/lang/String;IIZZ)V
  229. .locals 9
  230. const-string v3, " \"<>^`{}|/\\?#"
  231. const/4 v5, 0x0
  232. const/4 v6, 0x0
  233. const/4 v7, 0x1
  234. const/4 v8, 0x0
  235. move-object v0, p1
  236. move v1, p2
  237. move v2, p3
  238. move v4, p5
  239. invoke-static/range {v0 .. v8}, Lokhttp3/HttpUrl;->canonicalize(Ljava/lang/String;IILjava/lang/String;ZZZZLjava/nio/charset/Charset;)Ljava/lang/String;
  240. move-result-object p1
  241. invoke-direct {p0, p1}, Lokhttp3/HttpUrl$Builder;->isDot(Ljava/lang/String;)Z
  242. move-result p2
  243. if-eqz p2, :cond_0
  244. return-void
  245. :cond_0
  246. invoke-direct {p0, p1}, Lokhttp3/HttpUrl$Builder;->isDotDot(Ljava/lang/String;)Z
  247. move-result p2
  248. if-eqz p2, :cond_1
  249. invoke-direct {p0}, Lokhttp3/HttpUrl$Builder;->pop()V
  250. return-void
  251. :cond_1
  252. iget-object p2, p0, Lokhttp3/HttpUrl$Builder;->encodedPathSegments:Ljava/util/List;
  253. invoke-interface {p2}, Ljava/util/List;->size()I
  254. move-result p3
  255. add-int/lit8 p3, p3, -0x1
  256. invoke-interface {p2, p3}, Ljava/util/List;->get(I)Ljava/lang/Object;
  257. move-result-object p2
  258. check-cast p2, Ljava/lang/String;
  259. invoke-virtual {p2}, Ljava/lang/String;->isEmpty()Z
  260. move-result p2
  261. if-eqz p2, :cond_2
  262. iget-object p2, p0, Lokhttp3/HttpUrl$Builder;->encodedPathSegments:Ljava/util/List;
  263. invoke-interface {p2}, Ljava/util/List;->size()I
  264. move-result p3
  265. add-int/lit8 p3, p3, -0x1
  266. invoke-interface {p2, p3, p1}, Ljava/util/List;->set(ILjava/lang/Object;)Ljava/lang/Object;
  267. goto :goto_0
  268. :cond_2
  269. iget-object p2, p0, Lokhttp3/HttpUrl$Builder;->encodedPathSegments:Ljava/util/List;
  270. invoke-interface {p2, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  271. :goto_0
  272. if-eqz p4, :cond_3
  273. iget-object p1, p0, Lokhttp3/HttpUrl$Builder;->encodedPathSegments:Ljava/util/List;
  274. const-string p2, ""
  275. invoke-interface {p1, p2}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  276. :cond_3
  277. return-void
  278. .end method
  279. .method private removeAllCanonicalQueryParameters(Ljava/lang/String;)V
  280. .locals 3
  281. iget-object v0, p0, Lokhttp3/HttpUrl$Builder;->encodedQueryNamesAndValues:Ljava/util/List;
  282. invoke-interface {v0}, Ljava/util/List;->size()I
  283. move-result v0
  284. add-int/lit8 v0, v0, -0x2
  285. :goto_0
  286. if-ltz v0, :cond_1
  287. iget-object v1, p0, Lokhttp3/HttpUrl$Builder;->encodedQueryNamesAndValues:Ljava/util/List;
  288. invoke-interface {v1, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;
  289. move-result-object v1
  290. invoke-virtual {p1, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
  291. move-result v1
  292. if-eqz v1, :cond_0
  293. iget-object v1, p0, Lokhttp3/HttpUrl$Builder;->encodedQueryNamesAndValues:Ljava/util/List;
  294. add-int/lit8 v2, v0, 0x1
  295. invoke-interface {v1, v2}, Ljava/util/List;->remove(I)Ljava/lang/Object;
  296. iget-object v1, p0, Lokhttp3/HttpUrl$Builder;->encodedQueryNamesAndValues:Ljava/util/List;
  297. invoke-interface {v1, v0}, Ljava/util/List;->remove(I)Ljava/lang/Object;
  298. iget-object v1, p0, Lokhttp3/HttpUrl$Builder;->encodedQueryNamesAndValues:Ljava/util/List;
  299. invoke-interface {v1}, Ljava/util/List;->isEmpty()Z
  300. move-result v1
  301. if-eqz v1, :cond_0
  302. const/4 p1, 0x0
  303. iput-object p1, p0, Lokhttp3/HttpUrl$Builder;->encodedQueryNamesAndValues:Ljava/util/List;
  304. return-void
  305. :cond_0
  306. add-int/lit8 v0, v0, -0x2
  307. goto :goto_0
  308. :cond_1
  309. return-void
  310. .end method
  311. .method private resolvePath(Ljava/lang/String;II)V
  312. .locals 10
  313. if-ne p2, p3, :cond_0
  314. return-void
  315. :cond_0
  316. invoke-virtual {p1, p2}, Ljava/lang/String;->charAt(I)C
  317. move-result v0
  318. const/16 v1, 0x2f
  319. const-string v2, ""
  320. const/4 v3, 0x1
  321. if-eq v0, v1, :cond_2
  322. const/16 v1, 0x5c
  323. if-ne v0, v1, :cond_1
  324. goto :goto_0
  325. :cond_1
  326. iget-object v0, p0, Lokhttp3/HttpUrl$Builder;->encodedPathSegments:Ljava/util/List;
  327. invoke-interface {v0}, Ljava/util/List;->size()I
  328. move-result v1
  329. sub-int/2addr v1, v3
  330. invoke-interface {v0, v1, v2}, Ljava/util/List;->set(ILjava/lang/Object;)Ljava/lang/Object;
  331. goto :goto_1
  332. :cond_2
  333. :goto_0
  334. iget-object v0, p0, Lokhttp3/HttpUrl$Builder;->encodedPathSegments:Ljava/util/List;
  335. invoke-interface {v0}, Ljava/util/List;->clear()V
  336. iget-object v0, p0, Lokhttp3/HttpUrl$Builder;->encodedPathSegments:Ljava/util/List;
  337. invoke-interface {v0, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  338. goto :goto_3
  339. :cond_3
  340. :goto_1
  341. move v6, p2
  342. if-ge v6, p3, :cond_5
  343. const-string p2, "/\\"
  344. invoke-static {p1, v6, p3, p2}, Lokhttp3/internal/Util;->delimiterOffset(Ljava/lang/String;IILjava/lang/String;)I
  345. move-result p2
  346. if-ge p2, p3, :cond_4
  347. const/4 v0, 0x1
  348. goto :goto_2
  349. :cond_4
  350. const/4 v0, 0x0
  351. :goto_2
  352. const/4 v9, 0x1
  353. move-object v4, p0
  354. move-object v5, p1
  355. move v7, p2
  356. move v8, v0
  357. invoke-direct/range {v4 .. v9}, Lokhttp3/HttpUrl$Builder;->push(Ljava/lang/String;IIZZ)V
  358. if-eqz v0, :cond_3
  359. :goto_3
  360. add-int/lit8 p2, p2, 0x1
  361. goto :goto_1
  362. :cond_5
  363. return-void
  364. .end method
  365. .method private static schemeDelimiterOffset(Ljava/lang/String;II)I
  366. .locals 7
  367. sub-int v0, p2, p1
  368. const/4 v1, -0x1
  369. const/4 v2, 0x2
  370. if-ge v0, v2, :cond_0
  371. return v1
  372. :cond_0
  373. invoke-virtual {p0, p1}, Ljava/lang/String;->charAt(I)C
  374. move-result v0
  375. const/16 v2, 0x5a
  376. const/16 v3, 0x7a
  377. const/16 v4, 0x41
  378. const/16 v5, 0x61
  379. if-lt v0, v5, :cond_1
  380. if-le v0, v3, :cond_2
  381. :cond_1
  382. if-lt v0, v4, :cond_7
  383. if-le v0, v2, :cond_2
  384. goto :goto_1
  385. :cond_2
  386. :goto_0
  387. add-int/lit8 p1, p1, 0x1
  388. if-ge p1, p2, :cond_7
  389. invoke-virtual {p0, p1}, Ljava/lang/String;->charAt(I)C
  390. move-result v0
  391. if-lt v0, v5, :cond_3
  392. if-le v0, v3, :cond_2
  393. :cond_3
  394. if-lt v0, v4, :cond_4
  395. if-le v0, v2, :cond_2
  396. :cond_4
  397. const/16 v6, 0x30
  398. if-lt v0, v6, :cond_5
  399. const/16 v6, 0x39
  400. if-le v0, v6, :cond_2
  401. :cond_5
  402. const/16 v6, 0x2b
  403. if-eq v0, v6, :cond_2
  404. const/16 v6, 0x2d
  405. if-eq v0, v6, :cond_2
  406. const/16 v6, 0x2e
  407. if-ne v0, v6, :cond_6
  408. goto :goto_0
  409. :cond_6
  410. const/16 p0, 0x3a
  411. if-ne v0, p0, :cond_7
  412. return p1
  413. :cond_7
  414. :goto_1
  415. return v1
  416. .end method
  417. .method private static slashCount(Ljava/lang/String;II)I
  418. .locals 3
  419. const/4 v0, 0x0
  420. :goto_0
  421. if-ge p1, p2, :cond_1
  422. invoke-virtual {p0, p1}, Ljava/lang/String;->charAt(I)C
  423. move-result v1
  424. const/16 v2, 0x5c
  425. if-eq v1, v2, :cond_0
  426. const/16 v2, 0x2f
  427. if-ne v1, v2, :cond_1
  428. :cond_0
  429. add-int/lit8 v0, v0, 0x1
  430. add-int/lit8 p1, p1, 0x1
  431. goto :goto_0
  432. :cond_1
  433. return v0
  434. .end method
  435. # virtual methods
  436. .method public addEncodedPathSegment(Ljava/lang/String;)Lokhttp3/HttpUrl$Builder;
  437. .locals 6
  438. if-eqz p1, :cond_0
  439. const/4 v2, 0x0
  440. invoke-virtual {p1}, Ljava/lang/String;->length()I
  441. move-result v3
  442. const/4 v4, 0x0
  443. const/4 v5, 0x1
  444. move-object v0, p0
  445. move-object v1, p1
  446. invoke-direct/range {v0 .. v5}, Lokhttp3/HttpUrl$Builder;->push(Ljava/lang/String;IIZZ)V
  447. return-object p0
  448. :cond_0
  449. new-instance p1, Ljava/lang/NullPointerException;
  450. const-string v0, "encodedPathSegment == null"
  451. invoke-direct {p1, v0}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
  452. throw p1
  453. .end method
  454. .method public addEncodedPathSegments(Ljava/lang/String;)Lokhttp3/HttpUrl$Builder;
  455. .locals 1
  456. if-eqz p1, :cond_0
  457. const/4 v0, 0x1
  458. invoke-direct {p0, p1, v0}, Lokhttp3/HttpUrl$Builder;->addPathSegments(Ljava/lang/String;Z)Lokhttp3/HttpUrl$Builder;
  459. move-result-object p1
  460. return-object p1
  461. :cond_0
  462. new-instance p1, Ljava/lang/NullPointerException;
  463. const-string v0, "encodedPathSegments == null"
  464. invoke-direct {p1, v0}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
  465. throw p1
  466. .end method
  467. .method public addEncodedQueryParameter(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/HttpUrl$Builder;
  468. .locals 7
  469. if-eqz p1, :cond_2
  470. iget-object v0, p0, Lokhttp3/HttpUrl$Builder;->encodedQueryNamesAndValues:Ljava/util/List;
  471. if-nez v0, :cond_0
  472. new-instance v0, Ljava/util/ArrayList;
  473. invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
  474. iput-object v0, p0, Lokhttp3/HttpUrl$Builder;->encodedQueryNamesAndValues:Ljava/util/List;
  475. :cond_0
  476. iget-object v0, p0, Lokhttp3/HttpUrl$Builder;->encodedQueryNamesAndValues:Ljava/util/List;
  477. const/4 v3, 0x1
  478. const/4 v4, 0x0
  479. const/4 v5, 0x1
  480. const/4 v6, 0x1
  481. const-string v2, " \"\'<>#&="
  482. move-object v1, p1
  483. invoke-static/range {v1 .. v6}, Lokhttp3/HttpUrl;->canonicalize(Ljava/lang/String;Ljava/lang/String;ZZZZ)Ljava/lang/String;
  484. move-result-object p1
  485. invoke-interface {v0, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  486. iget-object p1, p0, Lokhttp3/HttpUrl$Builder;->encodedQueryNamesAndValues:Ljava/util/List;
  487. if-eqz p2, :cond_1
  488. const/4 v2, 0x1
  489. const/4 v3, 0x0
  490. const/4 v4, 0x1
  491. const/4 v5, 0x1
  492. const-string v1, " \"\'<>#&="
  493. move-object v0, p2
  494. invoke-static/range {v0 .. v5}, Lokhttp3/HttpUrl;->canonicalize(Ljava/lang/String;Ljava/lang/String;ZZZZ)Ljava/lang/String;
  495. move-result-object p2
  496. goto :goto_0
  497. :cond_1
  498. const/4 p2, 0x0
  499. :goto_0
  500. invoke-interface {p1, p2}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  501. return-object p0
  502. :cond_2
  503. new-instance p1, Ljava/lang/NullPointerException;
  504. const-string p2, "encodedName == null"
  505. invoke-direct {p1, p2}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
  506. throw p1
  507. .end method
  508. .method public addPathSegment(Ljava/lang/String;)Lokhttp3/HttpUrl$Builder;
  509. .locals 6
  510. if-eqz p1, :cond_0
  511. const/4 v2, 0x0
  512. invoke-virtual {p1}, Ljava/lang/String;->length()I
  513. move-result v3
  514. const/4 v4, 0x0
  515. const/4 v5, 0x0
  516. move-object v0, p0
  517. move-object v1, p1
  518. invoke-direct/range {v0 .. v5}, Lokhttp3/HttpUrl$Builder;->push(Ljava/lang/String;IIZZ)V
  519. return-object p0
  520. :cond_0
  521. new-instance p1, Ljava/lang/NullPointerException;
  522. const-string v0, "pathSegment == null"
  523. invoke-direct {p1, v0}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
  524. throw p1
  525. .end method
  526. .method public addPathSegments(Ljava/lang/String;)Lokhttp3/HttpUrl$Builder;
  527. .locals 1
  528. if-eqz p1, :cond_0
  529. const/4 v0, 0x0
  530. invoke-direct {p0, p1, v0}, Lokhttp3/HttpUrl$Builder;->addPathSegments(Ljava/lang/String;Z)Lokhttp3/HttpUrl$Builder;
  531. move-result-object p1
  532. return-object p1
  533. :cond_0
  534. new-instance p1, Ljava/lang/NullPointerException;
  535. const-string v0, "pathSegments == null"
  536. invoke-direct {p1, v0}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
  537. throw p1
  538. .end method
  539. .method public addQueryParameter(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/HttpUrl$Builder;
  540. .locals 7
  541. if-eqz p1, :cond_2
  542. iget-object v0, p0, Lokhttp3/HttpUrl$Builder;->encodedQueryNamesAndValues:Ljava/util/List;
  543. if-nez v0, :cond_0
  544. new-instance v0, Ljava/util/ArrayList;
  545. invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
  546. iput-object v0, p0, Lokhttp3/HttpUrl$Builder;->encodedQueryNamesAndValues:Ljava/util/List;
  547. :cond_0
  548. iget-object v0, p0, Lokhttp3/HttpUrl$Builder;->encodedQueryNamesAndValues:Ljava/util/List;
  549. const/4 v3, 0x0
  550. const/4 v4, 0x0
  551. const/4 v5, 0x1
  552. const/4 v6, 0x1
  553. const-string v2, " \"\'<>#&="
  554. move-object v1, p1
  555. invoke-static/range {v1 .. v6}, Lokhttp3/HttpUrl;->canonicalize(Ljava/lang/String;Ljava/lang/String;ZZZZ)Ljava/lang/String;
  556. move-result-object p1
  557. invoke-interface {v0, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  558. iget-object p1, p0, Lokhttp3/HttpUrl$Builder;->encodedQueryNamesAndValues:Ljava/util/List;
  559. if-eqz p2, :cond_1
  560. const/4 v2, 0x0
  561. const/4 v3, 0x0
  562. const/4 v4, 0x1
  563. const/4 v5, 0x1
  564. const-string v1, " \"\'<>#&="
  565. move-object v0, p2
  566. invoke-static/range {v0 .. v5}, Lokhttp3/HttpUrl;->canonicalize(Ljava/lang/String;Ljava/lang/String;ZZZZ)Ljava/lang/String;
  567. move-result-object p2
  568. goto :goto_0
  569. :cond_1
  570. const/4 p2, 0x0
  571. :goto_0
  572. invoke-interface {p1, p2}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  573. return-object p0
  574. :cond_2
  575. new-instance p1, Ljava/lang/NullPointerException;
  576. const-string p2, "name == null"
  577. invoke-direct {p1, p2}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
  578. throw p1
  579. .end method
  580. .method public build()Lokhttp3/HttpUrl;
  581. .locals 2
  582. iget-object v0, p0, Lokhttp3/HttpUrl$Builder;->scheme:Ljava/lang/String;
  583. if-eqz v0, :cond_1
  584. iget-object v0, p0, Lokhttp3/HttpUrl$Builder;->host:Ljava/lang/String;
  585. if-eqz v0, :cond_0
  586. new-instance v0, Lokhttp3/HttpUrl;
  587. invoke-direct {v0, p0}, Lokhttp3/HttpUrl;-><init>(Lokhttp3/HttpUrl$Builder;)V
  588. return-object v0
  589. :cond_0
  590. new-instance v0, Ljava/lang/IllegalStateException;
  591. const-string v1, "host == null"
  592. invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
  593. throw v0
  594. :cond_1
  595. new-instance v0, Ljava/lang/IllegalStateException;
  596. const-string v1, "scheme == null"
  597. invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
  598. throw v0
  599. .end method
  600. .method effectivePort()I
  601. .locals 2
  602. iget v0, p0, Lokhttp3/HttpUrl$Builder;->port:I
  603. const/4 v1, -0x1
  604. if-eq v0, v1, :cond_0
  605. goto :goto_0
  606. :cond_0
  607. iget-object v0, p0, Lokhttp3/HttpUrl$Builder;->scheme:Ljava/lang/String;
  608. invoke-static {v0}, Lokhttp3/HttpUrl;->defaultPort(Ljava/lang/String;)I
  609. move-result v0
  610. :goto_0
  611. return v0
  612. .end method
  613. .method public encodedFragment(Ljava/lang/String;)Lokhttp3/HttpUrl$Builder;
  614. .locals 6
  615. if-eqz p1, :cond_0
  616. const/4 v2, 0x1
  617. const/4 v3, 0x0
  618. const/4 v4, 0x0
  619. const/4 v5, 0x0
  620. const-string v1, ""
  621. move-object v0, p1
  622. invoke-static/range {v0 .. v5}, Lokhttp3/HttpUrl;->canonicalize(Ljava/lang/String;Ljava/lang/String;ZZZZ)Ljava/lang/String;
  623. move-result-object p1
  624. goto :goto_0
  625. :cond_0
  626. const/4 p1, 0x0
  627. :goto_0
  628. iput-object p1, p0, Lokhttp3/HttpUrl$Builder;->encodedFragment:Ljava/lang/String;
  629. return-object p0
  630. .end method
  631. .method public encodedPassword(Ljava/lang/String;)Lokhttp3/HttpUrl$Builder;
  632. .locals 6
  633. if-eqz p1, :cond_0
  634. const/4 v2, 0x1
  635. const/4 v3, 0x0
  636. const/4 v4, 0x0
  637. const/4 v5, 0x1
  638. const-string v1, " \"\':;<=>@[]^`{}|/\\?#"
  639. move-object v0, p1
  640. invoke-static/range {v0 .. v5}, Lokhttp3/HttpUrl;->canonicalize(Ljava/lang/String;Ljava/lang/String;ZZZZ)Ljava/lang/String;
  641. move-result-object p1
  642. iput-object p1, p0, Lokhttp3/HttpUrl$Builder;->encodedPassword:Ljava/lang/String;
  643. return-object p0
  644. :cond_0
  645. new-instance p1, Ljava/lang/NullPointerException;
  646. const-string v0, "encodedPassword == null"
  647. invoke-direct {p1, v0}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
  648. throw p1
  649. .end method
  650. .method public encodedPath(Ljava/lang/String;)Lokhttp3/HttpUrl$Builder;
  651. .locals 3
  652. if-eqz p1, :cond_1
  653. const-string v0, "/"
  654. invoke-virtual {p1, v0}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
  655. move-result v0
  656. if-eqz v0, :cond_0
  657. const/4 v0, 0x0
  658. invoke-virtual {p1}, Ljava/lang/String;->length()I
  659. move-result v1
  660. invoke-direct {p0, p1, v0, v1}, Lokhttp3/HttpUrl$Builder;->resolvePath(Ljava/lang/String;II)V
  661. return-object p0
  662. :cond_0
  663. new-instance v0, Ljava/lang/IllegalArgumentException;
  664. new-instance v1, Ljava/lang/StringBuilder;
  665. invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
  666. const-string v2, "unexpected encodedPath: "
  667. invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  668. invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  669. invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
  670. move-result-object p1
  671. invoke-direct {v0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
  672. throw v0
  673. :cond_1
  674. new-instance p1, Ljava/lang/NullPointerException;
  675. const-string v0, "encodedPath == null"
  676. invoke-direct {p1, v0}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
  677. throw p1
  678. .end method
  679. .method public encodedQuery(Ljava/lang/String;)Lokhttp3/HttpUrl$Builder;
  680. .locals 6
  681. if-eqz p1, :cond_0
  682. const/4 v2, 0x1
  683. const/4 v3, 0x0
  684. const/4 v4, 0x1
  685. const/4 v5, 0x1
  686. const-string v1, " \"\'<>#"
  687. move-object v0, p1
  688. invoke-static/range {v0 .. v5}, Lokhttp3/HttpUrl;->canonicalize(Ljava/lang/String;Ljava/lang/String;ZZZZ)Ljava/lang/String;
  689. move-result-object p1
  690. invoke-static {p1}, Lokhttp3/HttpUrl;->queryStringToNamesAndValues(Ljava/lang/String;)Ljava/util/List;
  691. move-result-object p1
  692. goto :goto_0
  693. :cond_0
  694. const/4 p1, 0x0
  695. :goto_0
  696. iput-object p1, p0, Lokhttp3/HttpUrl$Builder;->encodedQueryNamesAndValues:Ljava/util/List;
  697. return-object p0
  698. .end method
  699. .method public encodedUsername(Ljava/lang/String;)Lokhttp3/HttpUrl$Builder;
  700. .locals 6
  701. if-eqz p1, :cond_0
  702. const/4 v2, 0x1
  703. const/4 v3, 0x0
  704. const/4 v4, 0x0
  705. const/4 v5, 0x1
  706. const-string v1, " \"\':;<=>@[]^`{}|/\\?#"
  707. move-object v0, p1
  708. invoke-static/range {v0 .. v5}, Lokhttp3/HttpUrl;->canonicalize(Ljava/lang/String;Ljava/lang/String;ZZZZ)Ljava/lang/String;
  709. move-result-object p1
  710. iput-object p1, p0, Lokhttp3/HttpUrl$Builder;->encodedUsername:Ljava/lang/String;
  711. return-object p0
  712. :cond_0
  713. new-instance p1, Ljava/lang/NullPointerException;
  714. const-string v0, "encodedUsername == null"
  715. invoke-direct {p1, v0}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
  716. throw p1
  717. .end method
  718. .method public fragment(Ljava/lang/String;)Lokhttp3/HttpUrl$Builder;
  719. .locals 6
  720. if-eqz p1, :cond_0
  721. const/4 v2, 0x0
  722. const/4 v3, 0x0
  723. const/4 v4, 0x0
  724. const/4 v5, 0x0
  725. const-string v1, ""
  726. move-object v0, p1
  727. invoke-static/range {v0 .. v5}, Lokhttp3/HttpUrl;->canonicalize(Ljava/lang/String;Ljava/lang/String;ZZZZ)Ljava/lang/String;
  728. move-result-object p1
  729. goto :goto_0
  730. :cond_0
  731. const/4 p1, 0x0
  732. :goto_0
  733. iput-object p1, p0, Lokhttp3/HttpUrl$Builder;->encodedFragment:Ljava/lang/String;
  734. return-object p0
  735. .end method
  736. .method public host(Ljava/lang/String;)Lokhttp3/HttpUrl$Builder;
  737. .locals 3
  738. if-eqz p1, :cond_1
  739. const/4 v0, 0x0
  740. invoke-virtual {p1}, Ljava/lang/String;->length()I
  741. move-result v1
  742. invoke-static {p1, v0, v1}, Lokhttp3/HttpUrl$Builder;->canonicalizeHost(Ljava/lang/String;II)Ljava/lang/String;
  743. move-result-object v0
  744. if-eqz v0, :cond_0
  745. iput-object v0, p0, Lokhttp3/HttpUrl$Builder;->host:Ljava/lang/String;
  746. return-object p0
  747. :cond_0
  748. new-instance v0, Ljava/lang/IllegalArgumentException;
  749. new-instance v1, Ljava/lang/StringBuilder;
  750. invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
  751. const-string v2, "unexpected host: "
  752. invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  753. invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  754. invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
  755. move-result-object p1
  756. invoke-direct {v0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
  757. throw v0
  758. :cond_1
  759. new-instance p1, Ljava/lang/NullPointerException;
  760. const-string v0, "host == null"
  761. invoke-direct {p1, v0}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
  762. throw p1
  763. .end method
  764. .method parse(Lokhttp3/HttpUrl;Ljava/lang/String;)Lokhttp3/HttpUrl$Builder$ParseResult;
  765. .locals 21
  766. move-object/from16 v0, p0
  767. move-object/from16 v1, p1
  768. move-object/from16 v10, p2
  769. invoke-virtual/range {p2 .. p2}, Ljava/lang/String;->length()I
  770. move-result v2
  771. const/4 v8, 0x0
  772. invoke-static {v10, v8, v2}, Lokhttp3/internal/Util;->skipLeadingAsciiWhitespace(Ljava/lang/String;II)I
  773. move-result v9
  774. invoke-virtual/range {p2 .. p2}, Ljava/lang/String;->length()I
  775. move-result v2
  776. invoke-static {v10, v9, v2}, Lokhttp3/internal/Util;->skipTrailingAsciiWhitespace(Ljava/lang/String;II)I
  777. move-result v11
  778. invoke-static {v10, v9, v11}, Lokhttp3/HttpUrl$Builder;->schemeDelimiterOffset(Ljava/lang/String;II)I
  779. move-result v2
  780. const/4 v12, -0x1
  781. if-eq v2, v12, :cond_2
  782. const/4 v3, 0x1
  783. const/4 v6, 0x0
  784. const/4 v7, 0x6
  785. const-string v5, "https:"
  786. move-object/from16 v2, p2
  787. move v4, v9
  788. invoke-virtual/range {v2 .. v7}, Ljava/lang/String;->regionMatches(ZILjava/lang/String;II)Z
  789. move-result v2
  790. if-eqz v2, :cond_0
  791. const-string v2, "https"
  792. iput-object v2, v0, Lokhttp3/HttpUrl$Builder;->scheme:Ljava/lang/String;
  793. add-int/lit8 v9, v9, 0x6
  794. goto :goto_0
  795. :cond_0
  796. const/4 v3, 0x1
  797. const/4 v6, 0x0
  798. const/4 v7, 0x5
  799. const-string v5, "http:"
  800. move-object/from16 v2, p2
  801. move v4, v9
  802. invoke-virtual/range {v2 .. v7}, Ljava/lang/String;->regionMatches(ZILjava/lang/String;II)Z
  803. move-result v2
  804. if-eqz v2, :cond_1
  805. const-string v2, "http"
  806. iput-object v2, v0, Lokhttp3/HttpUrl$Builder;->scheme:Ljava/lang/String;
  807. add-int/lit8 v9, v9, 0x5
  808. goto :goto_0
  809. :cond_1
  810. sget-object v1, Lokhttp3/HttpUrl$Builder$ParseResult;->UNSUPPORTED_SCHEME:Lokhttp3/HttpUrl$Builder$ParseResult;
  811. return-object v1
  812. :cond_2
  813. if-eqz v1, :cond_12
  814. iget-object v2, v1, Lokhttp3/HttpUrl;->scheme:Ljava/lang/String;
  815. iput-object v2, v0, Lokhttp3/HttpUrl$Builder;->scheme:Ljava/lang/String;
  816. :goto_0
  817. invoke-static {v10, v9, v11}, Lokhttp3/HttpUrl$Builder;->slashCount(Ljava/lang/String;II)I
  818. move-result v2
  819. const/4 v3, 0x2
  820. const/16 v13, 0x3f
  821. const/16 v14, 0x23
  822. if-ge v2, v3, :cond_6
  823. if-eqz v1, :cond_6
  824. iget-object v3, v1, Lokhttp3/HttpUrl;->scheme:Ljava/lang/String;
  825. iget-object v4, v0, Lokhttp3/HttpUrl$Builder;->scheme:Ljava/lang/String;
  826. invoke-virtual {v3, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
  827. move-result v3
  828. if-nez v3, :cond_3
  829. goto :goto_1
  830. :cond_3
  831. invoke-virtual/range {p1 .. p1}, Lokhttp3/HttpUrl;->encodedUsername()Ljava/lang/String;
  832. move-result-object v2
  833. iput-object v2, v0, Lokhttp3/HttpUrl$Builder;->encodedUsername:Ljava/lang/String;
  834. invoke-virtual/range {p1 .. p1}, Lokhttp3/HttpUrl;->encodedPassword()Ljava/lang/String;
  835. move-result-object v2
  836. iput-object v2, v0, Lokhttp3/HttpUrl$Builder;->encodedPassword:Ljava/lang/String;
  837. iget-object v2, v1, Lokhttp3/HttpUrl;->host:Ljava/lang/String;
  838. iput-object v2, v0, Lokhttp3/HttpUrl$Builder;->host:Ljava/lang/String;
  839. iget v2, v1, Lokhttp3/HttpUrl;->port:I
  840. iput v2, v0, Lokhttp3/HttpUrl$Builder;->port:I
  841. iget-object v2, v0, Lokhttp3/HttpUrl$Builder;->encodedPathSegments:Ljava/util/List;
  842. invoke-interface {v2}, Ljava/util/List;->clear()V
  843. iget-object v2, v0, Lokhttp3/HttpUrl$Builder;->encodedPathSegments:Ljava/util/List;
  844. invoke-virtual/range {p1 .. p1}, Lokhttp3/HttpUrl;->encodedPathSegments()Ljava/util/List;
  845. move-result-object v3
  846. invoke-interface {v2, v3}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z
  847. if-eq v9, v11, :cond_4
  848. invoke-virtual {v10, v9}, Ljava/lang/String;->charAt(I)C
  849. move-result v2
  850. if-ne v2, v14, :cond_5
  851. :cond_4
  852. invoke-virtual/range {p1 .. p1}, Lokhttp3/HttpUrl;->encodedQuery()Ljava/lang/String;
  853. move-result-object v1
  854. invoke-virtual {v0, v1}, Lokhttp3/HttpUrl$Builder;->encodedQuery(Ljava/lang/String;)Lokhttp3/HttpUrl$Builder;
  855. :cond_5
  856. move v13, v9
  857. goto/16 :goto_6
  858. :cond_6
  859. :goto_1
  860. add-int/2addr v9, v2
  861. move v2, v9
  862. const/16 v16, 0x0
  863. const/16 v17, 0x0
  864. :goto_2
  865. const-string v1, "@/\\?#"
  866. invoke-static {v10, v2, v11, v1}, Lokhttp3/internal/Util;->delimiterOffset(Ljava/lang/String;IILjava/lang/String;)I
  867. move-result v9
  868. if-eq v9, v11, :cond_7
  869. invoke-virtual {v10, v9}, Ljava/lang/String;->charAt(I)C
  870. move-result v1
  871. goto :goto_3
  872. :cond_7
  873. const/4 v1, -0x1
  874. :goto_3
  875. if-eq v1, v12, :cond_c
  876. if-eq v1, v14, :cond_c
  877. const/16 v3, 0x2f
  878. if-eq v1, v3, :cond_c
  879. const/16 v3, 0x5c
  880. if-eq v1, v3, :cond_c
  881. if-eq v1, v13, :cond_c
  882. const/16 v3, 0x40
  883. if-eq v1, v3, :cond_8
  884. goto/16 :goto_5
  885. :cond_8
  886. const-string v8, "%40"
  887. if-nez v16, :cond_b
  888. const/16 v1, 0x3a
  889. invoke-static {v10, v2, v9, v1}, Lokhttp3/internal/Util;->delimiterOffset(Ljava/lang/String;IIC)I
  890. move-result v7
  891. const/4 v5, 0x1
  892. const/4 v6, 0x0
  893. const/16 v18, 0x0
  894. const/16 v19, 0x1
  895. const/16 v20, 0x0
  896. const-string v4, " \"\':;<=>@[]^`{}|/\\?#"
  897. move-object/from16 v1, p2
  898. move v3, v7
  899. move v15, v7
  900. move/from16 v7, v18
  901. move-object v14, v8
  902. move/from16 v8, v19
  903. move v13, v9
  904. move-object/from16 v9, v20
  905. invoke-static/range {v1 .. v9}, Lokhttp3/HttpUrl;->canonicalize(Ljava/lang/String;IILjava/lang/String;ZZZZLjava/nio/charset/Charset;)Ljava/lang/String;
  906. move-result-object v1
  907. if-eqz v17, :cond_9
  908. new-instance v2, Ljava/lang/StringBuilder;
  909. invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
  910. iget-object v3, v0, Lokhttp3/HttpUrl$Builder;->encodedUsername:Ljava/lang/String;
  911. invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  912. invoke-virtual {v2, v14}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  913. invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  914. invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
  915. move-result-object v1
  916. :cond_9
  917. iput-object v1, v0, Lokhttp3/HttpUrl$Builder;->encodedUsername:Ljava/lang/String;
  918. if-eq v15, v13, :cond_a
  919. add-int/lit8 v2, v15, 0x1
  920. const/4 v5, 0x1
  921. const/4 v6, 0x0
  922. const/4 v7, 0x0
  923. const/4 v8, 0x1
  924. const/4 v9, 0x0
  925. const-string v4, " \"\':;<=>@[]^`{}|/\\?#"
  926. move-object/from16 v1, p2
  927. move v3, v13
  928. invoke-static/range {v1 .. v9}, Lokhttp3/HttpUrl;->canonicalize(Ljava/lang/String;IILjava/lang/String;ZZZZLjava/nio/charset/Charset;)Ljava/lang/String;
  929. move-result-object v1
  930. iput-object v1, v0, Lokhttp3/HttpUrl$Builder;->encodedPassword:Ljava/lang/String;
  931. const/16 v16, 0x1
  932. :cond_a
  933. const/16 v17, 0x1
  934. goto :goto_4
  935. :cond_b
  936. move-object v14, v8
  937. move v13, v9
  938. new-instance v15, Ljava/lang/StringBuilder;
  939. invoke-direct {v15}, Ljava/lang/StringBuilder;-><init>()V
  940. iget-object v1, v0, Lokhttp3/HttpUrl$Builder;->encodedPassword:Ljava/lang/String;
  941. invoke-virtual {v15, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  942. invoke-virtual {v15, v14}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  943. const/4 v5, 0x1
  944. const/4 v6, 0x0
  945. const/4 v7, 0x0
  946. const/4 v8, 0x1
  947. const/4 v9, 0x0
  948. const-string v4, " \"\':;<=>@[]^`{}|/\\?#"
  949. move-object/from16 v1, p2
  950. move v3, v13
  951. invoke-static/range {v1 .. v9}, Lokhttp3/HttpUrl;->canonicalize(Ljava/lang/String;IILjava/lang/String;ZZZZLjava/nio/charset/Charset;)Ljava/lang/String;
  952. move-result-object v1
  953. invoke-virtual {v15, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  954. invoke-virtual {v15}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
  955. move-result-object v1
  956. iput-object v1, v0, Lokhttp3/HttpUrl$Builder;->encodedPassword:Ljava/lang/String;
  957. :goto_4
  958. add-int/lit8 v2, v13, 0x1
  959. :goto_5
  960. const/16 v13, 0x3f
  961. const/16 v14, 0x23
  962. goto/16 :goto_2
  963. :cond_c
  964. move v13, v9
  965. invoke-static {v10, v2, v13}, Lokhttp3/HttpUrl$Builder;->portColonOffset(Ljava/lang/String;II)I
  966. move-result v1
  967. add-int/lit8 v3, v1, 0x1
  968. invoke-static {v10, v2, v1}, Lokhttp3/HttpUrl$Builder;->canonicalizeHost(Ljava/lang/String;II)Ljava/lang/String;
  969. move-result-object v1
  970. iput-object v1, v0, Lokhttp3/HttpUrl$Builder;->host:Ljava/lang/String;
  971. if-ge v3, v13, :cond_d
  972. invoke-static {v10, v3, v13}, Lokhttp3/HttpUrl$Builder;->parsePort(Ljava/lang/String;II)I
  973. move-result v1
  974. iput v1, v0, Lokhttp3/HttpUrl$Builder;->port:I
  975. iget v1, v0, Lokhttp3/HttpUrl$Builder;->port:I
  976. if-ne v1, v12, :cond_e
  977. sget-object v1, Lokhttp3/HttpUrl$Builder$ParseResult;->INVALID_PORT:Lokhttp3/HttpUrl$Builder$ParseResult;
  978. return-object v1
  979. :cond_d
  980. iget-object v1, v0, Lokhttp3/HttpUrl$Builder;->scheme:Ljava/lang/String;
  981. invoke-static {v1}, Lokhttp3/HttpUrl;->defaultPort(Ljava/lang/String;)I
  982. move-result v1
  983. iput v1, v0, Lokhttp3/HttpUrl$Builder;->port:I
  984. :cond_e
  985. iget-object v1, v0, Lokhttp3/HttpUrl$Builder;->host:Ljava/lang/String;
  986. if-nez v1, :cond_f
  987. sget-object v1, Lokhttp3/HttpUrl$Builder$ParseResult;->INVALID_HOST:Lokhttp3/HttpUrl$Builder$ParseResult;
  988. return-object v1
  989. :cond_f
  990. :goto_6
  991. const-string v1, "?#"
  992. invoke-static {v10, v13, v11, v1}, Lokhttp3/internal/Util;->delimiterOffset(Ljava/lang/String;IILjava/lang/String;)I
  993. move-result v1
  994. invoke-direct {v0, v10, v13, v1}, Lokhttp3/HttpUrl$Builder;->resolvePath(Ljava/lang/String;II)V
  995. if-ge v1, v11, :cond_10
  996. invoke-virtual {v10, v1}, Ljava/lang/String;->charAt(I)C
  997. move-result v2
  998. const/16 v3, 0x3f
  999. if-ne v2, v3, :cond_10
  1000. const/16 v2, 0x23
  1001. invoke-static {v10, v1, v11, v2}, Lokhttp3/internal/Util;->delimiterOffset(Ljava/lang/String;IIC)I
  1002. move-result v12
  1003. add-int/lit8 v2, v1, 0x1
  1004. const/4 v5, 0x1
  1005. const/4 v6, 0x0
  1006. const/4 v7, 0x1
  1007. const/4 v8, 0x1
  1008. const/4 v9, 0x0
  1009. const-string v4, " \"\'<>#"
  1010. move-object/from16 v1, p2
  1011. move v3, v12
  1012. invoke-static/range {v1 .. v9}, Lokhttp3/HttpUrl;->canonicalize(Ljava/lang/String;IILjava/lang/String;ZZZZLjava/nio/charset/Charset;)Ljava/lang/String;
  1013. move-result-object v1
  1014. invoke-static {v1}, Lokhttp3/HttpUrl;->queryStringToNamesAndValues(Ljava/lang/String;)Ljava/util/List;
  1015. move-result-object v1
  1016. iput-object v1, v0, Lokhttp3/HttpUrl$Builder;->encodedQueryNamesAndValues:Ljava/util/List;
  1017. move v1, v12
  1018. :cond_10
  1019. if-ge v1, v11, :cond_11
  1020. invoke-virtual {v10, v1}, Ljava/lang/String;->charAt(I)C
  1021. move-result v2
  1022. const/16 v3, 0x23
  1023. if-ne v2, v3, :cond_11
  1024. const/4 v2, 0x1
  1025. add-int/2addr v2, v1
  1026. const/4 v5, 0x1
  1027. const/4 v6, 0x0
  1028. const/4 v7, 0x0
  1029. const/4 v8, 0x0
  1030. const/4 v9, 0x0
  1031. const-string v4, ""
  1032. move-object/from16 v1, p2
  1033. move v3, v11
  1034. invoke-static/range {v1 .. v9}, Lokhttp3/HttpUrl;->canonicalize(Ljava/lang/String;IILjava/lang/String;ZZZZLjava/nio/charset/Charset;)Ljava/lang/String;
  1035. move-result-object v1
  1036. iput-object v1, v0, Lokhttp3/HttpUrl$Builder;->encodedFragment:Ljava/lang/String;
  1037. :cond_11
  1038. sget-object v1, Lokhttp3/HttpUrl$Builder$ParseResult;->SUCCESS:Lokhttp3/HttpUrl$Builder$ParseResult;
  1039. return-object v1
  1040. :cond_12
  1041. sget-object v1, Lokhttp3/HttpUrl$Builder$ParseResult;->MISSING_SCHEME:Lokhttp3/HttpUrl$Builder$ParseResult;
  1042. return-object v1
  1043. .end method
  1044. .method public password(Ljava/lang/String;)Lokhttp3/HttpUrl$Builder;
  1045. .locals 6
  1046. if-eqz p1, :cond_0
  1047. const/4 v2, 0x0
  1048. const/4 v3, 0x0
  1049. const/4 v4, 0x0
  1050. const/4 v5, 0x1
  1051. const-string v1, " \"\':;<=>@[]^`{}|/\\?#"
  1052. move-object v0, p1
  1053. invoke-static/range {v0 .. v5}, Lokhttp3/HttpUrl;->canonicalize(Ljava/lang/String;Ljava/lang/String;ZZZZ)Ljava/lang/String;
  1054. move-result-object p1
  1055. iput-object p1, p0, Lokhttp3/HttpUrl$Builder;->encodedPassword:Ljava/lang/String;
  1056. return-object p0
  1057. :cond_0
  1058. new-instance p1, Ljava/lang/NullPointerException;
  1059. const-string v0, "password == null"
  1060. invoke-direct {p1, v0}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
  1061. throw p1
  1062. .end method
  1063. .method public port(I)Lokhttp3/HttpUrl$Builder;
  1064. .locals 3
  1065. if-lez p1, :cond_0
  1066. const v0, 0xffff
  1067. if-gt p1, v0, :cond_0
  1068. iput p1, p0, Lokhttp3/HttpUrl$Builder;->port:I
  1069. return-object p0
  1070. :cond_0
  1071. new-instance v0, Ljava/lang/IllegalArgumentException;
  1072. new-instance v1, Ljava/lang/StringBuilder;
  1073. invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
  1074. const-string v2, "unexpected port: "
  1075. invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  1076. invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
  1077. invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
  1078. move-result-object p1
  1079. invoke-direct {v0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
  1080. throw v0
  1081. .end method
  1082. .method public query(Ljava/lang/String;)Lokhttp3/HttpUrl$Builder;
  1083. .locals 6
  1084. if-eqz p1, :cond_0
  1085. const/4 v2, 0x0
  1086. const/4 v3, 0x0
  1087. const/4 v4, 0x1
  1088. const/4 v5, 0x1
  1089. const-string v1, " \"\'<>#"
  1090. move-object v0, p1
  1091. invoke-static/range {v0 .. v5}, Lokhttp3/HttpUrl;->canonicalize(Ljava/lang/String;Ljava/lang/String;ZZZZ)Ljava/lang/String;
  1092. move-result-object p1
  1093. invoke-static {p1}, Lokhttp3/HttpUrl;->queryStringToNamesAndValues(Ljava/lang/String;)Ljava/util/List;
  1094. move-result-object p1
  1095. goto :goto_0
  1096. :cond_0
  1097. const/4 p1, 0x0
  1098. :goto_0
  1099. iput-object p1, p0, Lokhttp3/HttpUrl$Builder;->encodedQueryNamesAndValues:Ljava/util/List;
  1100. return-object p0
  1101. .end method
  1102. .method reencodeForUri()Lokhttp3/HttpUrl$Builder;
  1103. .locals 10
  1104. iget-object v0, p0, Lokhttp3/HttpUrl$Builder;->encodedPathSegments:Ljava/util/List;
  1105. invoke-interface {v0}, Ljava/util/List;->size()I
  1106. move-result v0
  1107. const/4 v1, 0x0
  1108. const/4 v2, 0x0
  1109. :goto_0
  1110. if-ge v2, v0, :cond_0
  1111. iget-object v3, p0, Lokhttp3/HttpUrl$Builder;->encodedPathSegments:Ljava/util/List;
  1112. invoke-interface {v3, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;
  1113. move-result-object v3
  1114. move-object v4, v3
  1115. check-cast v4, Ljava/lang/String;
  1116. iget-object v3, p0, Lokhttp3/HttpUrl$Builder;->encodedPathSegments:Ljava/util/List;
  1117. const/4 v6, 0x1
  1118. const/4 v7, 0x1
  1119. const/4 v8, 0x0
  1120. const/4 v9, 0x1
  1121. const-string v5, "[]"
  1122. invoke-static/range {v4 .. v9}, Lokhttp3/HttpUrl;->canonicalize(Ljava/lang/String;Ljava/lang/String;ZZZZ)Ljava/lang/String;
  1123. move-result-object v4
  1124. invoke-interface {v3, v2, v4}, Ljava/util/List;->set(ILjava/lang/Object;)Ljava/lang/Object;
  1125. add-int/lit8 v2, v2, 0x1
  1126. goto :goto_0
  1127. :cond_0
  1128. iget-object v0, p0, Lokhttp3/HttpUrl$Builder;->encodedQueryNamesAndValues:Ljava/util/List;
  1129. if-eqz v0, :cond_2
  1130. invoke-interface {v0}, Ljava/util/List;->size()I
  1131. move-result v0
  1132. :goto_1
  1133. if-ge v1, v0, :cond_2
  1134. iget-object v2, p0, Lokhttp3/HttpUrl$Builder;->encodedQueryNamesAndValues:Ljava/util/List;
  1135. invoke-interface {v2, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;
  1136. move-result-object v2
  1137. move-object v3, v2
  1138. check-cast v3, Ljava/lang/String;
  1139. if-eqz v3, :cond_1
  1140. iget-object v2, p0, Lokhttp3/HttpUrl$Builder;->encodedQueryNamesAndValues:Ljava/util/List;
  1141. const/4 v5, 0x1
  1142. const/4 v6, 0x1
  1143. const/4 v7, 0x1
  1144. const/4 v8, 0x1
  1145. const-string v4, "\\^`{|}"
  1146. invoke-static/range {v3 .. v8}, Lokhttp3/HttpUrl;->canonicalize(Ljava/lang/String;Ljava/lang/String;ZZZZ)Ljava/lang/String;
  1147. move-result-object v3
  1148. invoke-interface {v2, v1, v3}, Ljava/util/List;->set(ILjava/lang/Object;)Ljava/lang/Object;
  1149. :cond_1
  1150. add-int/lit8 v1, v1, 0x1
  1151. goto :goto_1
  1152. :cond_2
  1153. iget-object v2, p0, Lokhttp3/HttpUrl$Builder;->encodedFragment:Ljava/lang/String;
  1154. if-eqz v2, :cond_3
  1155. const/4 v4, 0x1
  1156. const/4 v5, 0x1
  1157. const/4 v6, 0x0
  1158. const/4 v7, 0x0
  1159. const-string v3, " \"#<>\\^`{|}"
  1160. invoke-static/range {v2 .. v7}, Lokhttp3/HttpUrl;->canonicalize(Ljava/lang/String;Ljava/lang/String;ZZZZ)Ljava/lang/String;
  1161. move-result-object v0
  1162. iput-object v0, p0, Lokhttp3/HttpUrl$Builder;->encodedFragment:Ljava/lang/String;
  1163. :cond_3
  1164. return-object p0
  1165. .end method
  1166. .method public removeAllEncodedQueryParameters(Ljava/lang/String;)Lokhttp3/HttpUrl$Builder;
  1167. .locals 7
  1168. if-eqz p1, :cond_1
  1169. iget-object v0, p0, Lokhttp3/HttpUrl$Builder;->encodedQueryNamesAndValues:Ljava/util/List;
  1170. if-nez v0, :cond_0
  1171. return-object p0
  1172. :cond_0
  1173. const/4 v3, 0x1
  1174. const/4 v4, 0x0
  1175. const/4 v5, 0x1
  1176. const/4 v6, 0x1
  1177. const-string v2, " \"\'<>#&="
  1178. move-object v1, p1
  1179. invoke-static/range {v1 .. v6}, Lokhttp3/HttpUrl;->canonicalize(Ljava/lang/String;Ljava/lang/String;ZZZZ)Ljava/lang/String;
  1180. move-result-object p1
  1181. invoke-direct {p0, p1}, Lokhttp3/HttpUrl$Builder;->removeAllCanonicalQueryParameters(Ljava/lang/String;)V
  1182. return-object p0
  1183. :cond_1
  1184. new-instance p1, Ljava/lang/NullPointerException;
  1185. const-string v0, "encodedName == null"
  1186. invoke-direct {p1, v0}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
  1187. throw p1
  1188. .end method
  1189. .method public removeAllQueryParameters(Ljava/lang/String;)Lokhttp3/HttpUrl$Builder;
  1190. .locals 7
  1191. if-eqz p1, :cond_1
  1192. iget-object v0, p0, Lokhttp3/HttpUrl$Builder;->encodedQueryNamesAndValues:Ljava/util/List;
  1193. if-nez v0, :cond_0
  1194. return-object p0
  1195. :cond_0
  1196. const/4 v3, 0x0
  1197. const/4 v4, 0x0
  1198. const/4 v5, 0x1
  1199. const/4 v6, 0x1
  1200. const-string v2, " \"\'<>#&="
  1201. move-object v1, p1
  1202. invoke-static/range {v1 .. v6}, Lokhttp3/HttpUrl;->canonicalize(Ljava/lang/String;Ljava/lang/String;ZZZZ)Ljava/lang/String;
  1203. move-result-object p1
  1204. invoke-direct {p0, p1}, Lokhttp3/HttpUrl$Builder;->removeAllCanonicalQueryParameters(Ljava/lang/String;)V
  1205. return-object p0
  1206. :cond_1
  1207. new-instance p1, Ljava/lang/NullPointerException;
  1208. const-string v0, "name == null"
  1209. invoke-direct {p1, v0}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
  1210. throw p1
  1211. .end method
  1212. .method public removePathSegment(I)Lokhttp3/HttpUrl$Builder;
  1213. .locals 1
  1214. iget-object v0, p0, Lokhttp3/HttpUrl$Builder;->encodedPathSegments:Ljava/util/List;
  1215. invoke-interface {v0, p1}, Ljava/util/List;->remove(I)Ljava/lang/Object;
  1216. iget-object p1, p0, Lokhttp3/HttpUrl$Builder;->encodedPathSegments:Ljava/util/List;
  1217. invoke-interface {p1}, Ljava/util/List;->isEmpty()Z
  1218. move-result p1
  1219. if-eqz p1, :cond_0
  1220. iget-object p1, p0, Lokhttp3/HttpUrl$Builder;->encodedPathSegments:Ljava/util/List;
  1221. const-string v0, ""
  1222. invoke-interface {p1, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  1223. :cond_0
  1224. return-object p0
  1225. .end method
  1226. .method public scheme(Ljava/lang/String;)Lokhttp3/HttpUrl$Builder;
  1227. .locals 3
  1228. if-eqz p1, :cond_2
  1229. const-string v0, "http"
  1230. invoke-virtual {p1, v0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
  1231. move-result v1
  1232. if-eqz v1, :cond_0
  1233. :goto_0
  1234. iput-object v0, p0, Lokhttp3/HttpUrl$Builder;->scheme:Ljava/lang/String;
  1235. goto :goto_1
  1236. :cond_0
  1237. const-string v0, "https"
  1238. invoke-virtual {p1, v0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
  1239. move-result v1
  1240. if-eqz v1, :cond_1
  1241. goto :goto_0
  1242. :goto_1
  1243. return-object p0
  1244. :cond_1
  1245. new-instance v0, Ljava/lang/IllegalArgumentException;
  1246. new-instance v1, Ljava/lang/StringBuilder;
  1247. invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
  1248. const-string v2, "unexpected scheme: "
  1249. invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  1250. invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  1251. invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
  1252. move-result-object p1
  1253. invoke-direct {v0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
  1254. throw v0
  1255. :cond_2
  1256. new-instance p1, Ljava/lang/NullPointerException;
  1257. const-string v0, "scheme == null"
  1258. invoke-direct {p1, v0}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
  1259. goto :goto_3
  1260. :goto_2
  1261. throw p1
  1262. :goto_3
  1263. goto :goto_2
  1264. .end method
  1265. .method public setEncodedPathSegment(ILjava/lang/String;)Lokhttp3/HttpUrl$Builder;
  1266. .locals 9
  1267. if-eqz p2, :cond_1
  1268. const/4 v1, 0x0
  1269. invoke-virtual {p2}, Ljava/lang/String;->length()I
  1270. move-result v2
  1271. const/4 v4, 0x1
  1272. const/4 v5, 0x0
  1273. const/4 v6, 0x0
  1274. const/4 v7, 0x1
  1275. const/4 v8, 0x0
  1276. const-string v3, " \"<>^`{}|/\\?#"
  1277. move-object v0, p2
  1278. invoke-static/range {v0 .. v8}, Lokhttp3/HttpUrl;->canonicalize(Ljava/lang/String;IILjava/lang/String;ZZZZLjava/nio/charset/Charset;)Ljava/lang/String;
  1279. move-result-object v0
  1280. iget-object v1, p0, Lokhttp3/HttpUrl$Builder;->encodedPathSegments:Ljava/util/List;
  1281. invoke-interface {v1, p1, v0}, Ljava/util/List;->set(ILjava/lang/Object;)Ljava/lang/Object;
  1282. invoke-direct {p0, v0}, Lokhttp3/HttpUrl$Builder;->isDot(Ljava/lang/String;)Z
  1283. move-result p1
  1284. if-nez p1, :cond_0
  1285. invoke-direct {p0, v0}, Lokhttp3/HttpUrl$Builder;->isDotDot(Ljava/lang/String;)Z
  1286. move-result p1
  1287. if-nez p1, :cond_0
  1288. return-object p0
  1289. :cond_0
  1290. new-instance p1, Ljava/lang/IllegalArgumentException;
  1291. new-instance v0, Ljava/lang/StringBuilder;
  1292. invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
  1293. const-string v1, "unexpected path segment: "
  1294. invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  1295. invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  1296. invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
  1297. move-result-object p2
  1298. invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
  1299. throw p1
  1300. :cond_1
  1301. new-instance p1, Ljava/lang/NullPointerException;
  1302. const-string p2, "encodedPathSegment == null"
  1303. invoke-direct {p1, p2}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
  1304. throw p1
  1305. .end method
  1306. .method public setEncodedQueryParameter(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/HttpUrl$Builder;
  1307. .locals 0
  1308. invoke-virtual {p0, p1}, Lokhttp3/HttpUrl$Builder;->removeAllEncodedQueryParameters(Ljava/lang/String;)Lokhttp3/HttpUrl$Builder;
  1309. invoke-virtual {p0, p1, p2}, Lokhttp3/HttpUrl$Builder;->addEncodedQueryParameter(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/HttpUrl$Builder;
  1310. return-object p0
  1311. .end method
  1312. .method public setPathSegment(ILjava/lang/String;)Lokhttp3/HttpUrl$Builder;
  1313. .locals 9
  1314. if-eqz p2, :cond_1
  1315. const/4 v1, 0x0
  1316. invoke-virtual {p2}, Ljava/lang/String;->length()I
  1317. move-result v2
  1318. const/4 v4, 0x0
  1319. const/4 v5, 0x0
  1320. const/4 v6, 0x0
  1321. const/4 v7, 0x1
  1322. const/4 v8, 0x0
  1323. const-string v3, " \"<>^`{}|/\\?#"
  1324. move-object v0, p2
  1325. invoke-static/range {v0 .. v8}, Lokhttp3/HttpUrl;->canonicalize(Ljava/lang/String;IILjava/lang/String;ZZZZLjava/nio/charset/Charset;)Ljava/lang/String;
  1326. move-result-object v0
  1327. invoke-direct {p0, v0}, Lokhttp3/HttpUrl$Builder;->isDot(Ljava/lang/String;)Z
  1328. move-result v1
  1329. if-nez v1, :cond_0
  1330. invoke-direct {p0, v0}, Lokhttp3/HttpUrl$Builder;->isDotDot(Ljava/lang/String;)Z
  1331. move-result v1
  1332. if-nez v1, :cond_0
  1333. iget-object p2, p0, Lokhttp3/HttpUrl$Builder;->encodedPathSegments:Ljava/util/List;
  1334. invoke-interface {p2, p1, v0}, Ljava/util/List;->set(ILjava/lang/Object;)Ljava/lang/Object;
  1335. return-object p0
  1336. :cond_0
  1337. new-instance p1, Ljava/lang/IllegalArgumentException;
  1338. new-instance v0, Ljava/lang/StringBuilder;
  1339. invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
  1340. const-string v1, "unexpected path segment: "
  1341. invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  1342. invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  1343. invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
  1344. move-result-object p2
  1345. invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
  1346. throw p1
  1347. :cond_1
  1348. new-instance p1, Ljava/lang/NullPointerException;
  1349. const-string p2, "pathSegment == null"
  1350. invoke-direct {p1, p2}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
  1351. throw p1
  1352. .end method
  1353. .method public setQueryParameter(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/HttpUrl$Builder;
  1354. .locals 0
  1355. invoke-virtual {p0, p1}, Lokhttp3/HttpUrl$Builder;->removeAllQueryParameters(Ljava/lang/String;)Lokhttp3/HttpUrl$Builder;
  1356. invoke-virtual {p0, p1, p2}, Lokhttp3/HttpUrl$Builder;->addQueryParameter(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/HttpUrl$Builder;
  1357. return-object p0
  1358. .end method
  1359. .method public toString()Ljava/lang/String;
  1360. .locals 4
  1361. new-instance v0, Ljava/lang/StringBuilder;
  1362. invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
  1363. iget-object v1, p0, Lokhttp3/HttpUrl$Builder;->scheme:Ljava/lang/String;
  1364. invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  1365. const-string v1, "://"
  1366. invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  1367. iget-object v1, p0, Lokhttp3/HttpUrl$Builder;->encodedUsername:Ljava/lang/String;
  1368. invoke-virtual {v1}, Ljava/lang/String;->isEmpty()Z
  1369. move-result v1
  1370. const/16 v2, 0x3a
  1371. if-eqz v1, :cond_0
  1372. iget-object v1, p0, Lokhttp3/HttpUrl$Builder;->encodedPassword:Ljava/lang/String;
  1373. invoke-virtual {v1}, Ljava/lang/String;->isEmpty()Z
  1374. move-result v1
  1375. if-nez v1, :cond_2
  1376. :cond_0
  1377. iget-object v1, p0, Lokhttp3/HttpUrl$Builder;->encodedUsername:Ljava/lang/String;
  1378. invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  1379. iget-object v1, p0, Lokhttp3/HttpUrl$Builder;->encodedPassword:Ljava/lang/String;
  1380. invoke-virtual {v1}, Ljava/lang/String;->isEmpty()Z
  1381. move-result v1
  1382. if-nez v1, :cond_1
  1383. invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
  1384. iget-object v1, p0, Lokhttp3/HttpUrl$Builder;->encodedPassword:Ljava/lang/String;
  1385. invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  1386. :cond_1
  1387. const/16 v1, 0x40
  1388. invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
  1389. :cond_2
  1390. iget-object v1, p0, Lokhttp3/HttpUrl$Builder;->host:Ljava/lang/String;
  1391. invoke-virtual {v1, v2}, Ljava/lang/String;->indexOf(I)I
  1392. move-result v1
  1393. const/4 v3, -0x1
  1394. if-eq v1, v3, :cond_3
  1395. const/16 v1, 0x5b
  1396. invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
  1397. iget-object v1, p0, Lokhttp3/HttpUrl$Builder;->host:Ljava/lang/String;
  1398. invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  1399. const/16 v1, 0x5d
  1400. invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
  1401. goto :goto_0
  1402. :cond_3
  1403. iget-object v1, p0, Lokhttp3/HttpUrl$Builder;->host:Ljava/lang/String;
  1404. invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  1405. :goto_0
  1406. invoke-virtual {p0}, Lokhttp3/HttpUrl$Builder;->effectivePort()I
  1407. move-result v1
  1408. iget-object v3, p0, Lokhttp3/HttpUrl$Builder;->scheme:Ljava/lang/String;
  1409. invoke-static {v3}, Lokhttp3/HttpUrl;->defaultPort(Ljava/lang/String;)I
  1410. move-result v3
  1411. if-eq v1, v3, :cond_4
  1412. invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
  1413. invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
  1414. :cond_4
  1415. iget-object v1, p0, Lokhttp3/HttpUrl$Builder;->encodedPathSegments:Ljava/util/List;
  1416. invoke-static {v0, v1}, Lokhttp3/HttpUrl;->pathSegmentsToString(Ljava/lang/StringBuilder;Ljava/util/List;)V
  1417. iget-object v1, p0, Lokhttp3/HttpUrl$Builder;->encodedQueryNamesAndValues:Ljava/util/List;
  1418. if-eqz v1, :cond_5
  1419. const/16 v1, 0x3f
  1420. invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
  1421. iget-object v1, p0, Lokhttp3/HttpUrl$Builder;->encodedQueryNamesAndValues:Ljava/util/List;
  1422. invoke-static {v0, v1}, Lokhttp3/HttpUrl;->namesAndValuesToQueryString(Ljava/lang/StringBuilder;Ljava/util/List;)V
  1423. :cond_5
  1424. iget-object v1, p0, Lokhttp3/HttpUrl$Builder;->encodedFragment:Ljava/lang/String;
  1425. if-eqz v1, :cond_6
  1426. const/16 v1, 0x23
  1427. invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
  1428. iget-object v1, p0, Lokhttp3/HttpUrl$Builder;->encodedFragment:Ljava/lang/String;
  1429. invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  1430. :cond_6
  1431. invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
  1432. move-result-object v0
  1433. return-object v0
  1434. .end method
  1435. .method public username(Ljava/lang/String;)Lokhttp3/HttpUrl$Builder;
  1436. .locals 6
  1437. if-eqz p1, :cond_0
  1438. const/4 v2, 0x0
  1439. const/4 v3, 0x0
  1440. const/4 v4, 0x0
  1441. const/4 v5, 0x1
  1442. const-string v1, " \"\':;<=>@[]^`{}|/\\?#"
  1443. move-object v0, p1
  1444. invoke-static/range {v0 .. v5}, Lokhttp3/HttpUrl;->canonicalize(Ljava/lang/String;Ljava/lang/String;ZZZZ)Ljava/lang/String;
  1445. move-result-object p1
  1446. iput-object p1, p0, Lokhttp3/HttpUrl$Builder;->encodedUsername:Ljava/lang/String;
  1447. return-object p0
  1448. :cond_0
  1449. new-instance p1, Ljava/lang/NullPointerException;
  1450. const-string v0, "username == null"
  1451. invoke-direct {p1, v0}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
  1452. throw p1
  1453. .end method