Hpack.smali 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833
  1. .class final Lokhttp3/internal/http2/Hpack;
  2. .super Ljava/lang/Object;
  3. .source ""
  4. # annotations
  5. .annotation system Ldalvik/annotation/MemberClasses;
  6. value = {
  7. Lokhttp3/internal/http2/Hpack$Writer;,
  8. Lokhttp3/internal/http2/Hpack$Reader;
  9. }
  10. .end annotation
  11. # static fields
  12. .field static final NAME_TO_FIRST_INDEX:Ljava/util/Map;
  13. .annotation system Ldalvik/annotation/Signature;
  14. value = {
  15. "Ljava/util/Map<",
  16. "Lokio/ByteString;",
  17. "Ljava/lang/Integer;",
  18. ">;"
  19. }
  20. .end annotation
  21. .end field
  22. .field private static final PREFIX_4_BITS:I = 0xf
  23. .field private static final PREFIX_5_BITS:I = 0x1f
  24. .field private static final PREFIX_6_BITS:I = 0x3f
  25. .field private static final PREFIX_7_BITS:I = 0x7f
  26. .field static final STATIC_HEADER_TABLE:[Lokhttp3/internal/http2/Header;
  27. # direct methods
  28. .method static constructor <clinit>()V
  29. .locals 5
  30. const/16 v0, 0x3d
  31. new-array v0, v0, [Lokhttp3/internal/http2/Header;
  32. new-instance v1, Lokhttp3/internal/http2/Header;
  33. sget-object v2, Lokhttp3/internal/http2/Header;->TARGET_AUTHORITY:Lokio/ByteString;
  34. const-string v3, ""
  35. invoke-direct {v1, v2, v3}, Lokhttp3/internal/http2/Header;-><init>(Lokio/ByteString;Ljava/lang/String;)V
  36. const/4 v2, 0x0
  37. aput-object v1, v0, v2
  38. new-instance v1, Lokhttp3/internal/http2/Header;
  39. sget-object v2, Lokhttp3/internal/http2/Header;->TARGET_METHOD:Lokio/ByteString;
  40. const-string v4, "GET"
  41. invoke-direct {v1, v2, v4}, Lokhttp3/internal/http2/Header;-><init>(Lokio/ByteString;Ljava/lang/String;)V
  42. const/4 v2, 0x1
  43. aput-object v1, v0, v2
  44. new-instance v1, Lokhttp3/internal/http2/Header;
  45. sget-object v2, Lokhttp3/internal/http2/Header;->TARGET_METHOD:Lokio/ByteString;
  46. const-string v4, "POST"
  47. invoke-direct {v1, v2, v4}, Lokhttp3/internal/http2/Header;-><init>(Lokio/ByteString;Ljava/lang/String;)V
  48. const/4 v2, 0x2
  49. aput-object v1, v0, v2
  50. new-instance v1, Lokhttp3/internal/http2/Header;
  51. sget-object v2, Lokhttp3/internal/http2/Header;->TARGET_PATH:Lokio/ByteString;
  52. const-string v4, "/"
  53. invoke-direct {v1, v2, v4}, Lokhttp3/internal/http2/Header;-><init>(Lokio/ByteString;Ljava/lang/String;)V
  54. const/4 v2, 0x3
  55. aput-object v1, v0, v2
  56. new-instance v1, Lokhttp3/internal/http2/Header;
  57. sget-object v2, Lokhttp3/internal/http2/Header;->TARGET_PATH:Lokio/ByteString;
  58. const-string v4, "/index.html"
  59. invoke-direct {v1, v2, v4}, Lokhttp3/internal/http2/Header;-><init>(Lokio/ByteString;Ljava/lang/String;)V
  60. const/4 v2, 0x4
  61. aput-object v1, v0, v2
  62. new-instance v1, Lokhttp3/internal/http2/Header;
  63. sget-object v2, Lokhttp3/internal/http2/Header;->TARGET_SCHEME:Lokio/ByteString;
  64. const-string v4, "http"
  65. invoke-direct {v1, v2, v4}, Lokhttp3/internal/http2/Header;-><init>(Lokio/ByteString;Ljava/lang/String;)V
  66. const/4 v2, 0x5
  67. aput-object v1, v0, v2
  68. new-instance v1, Lokhttp3/internal/http2/Header;
  69. sget-object v2, Lokhttp3/internal/http2/Header;->TARGET_SCHEME:Lokio/ByteString;
  70. const-string v4, "https"
  71. invoke-direct {v1, v2, v4}, Lokhttp3/internal/http2/Header;-><init>(Lokio/ByteString;Ljava/lang/String;)V
  72. const/4 v2, 0x6
  73. aput-object v1, v0, v2
  74. new-instance v1, Lokhttp3/internal/http2/Header;
  75. sget-object v2, Lokhttp3/internal/http2/Header;->RESPONSE_STATUS:Lokio/ByteString;
  76. const-string v4, "200"
  77. invoke-direct {v1, v2, v4}, Lokhttp3/internal/http2/Header;-><init>(Lokio/ByteString;Ljava/lang/String;)V
  78. const/4 v2, 0x7
  79. aput-object v1, v0, v2
  80. new-instance v1, Lokhttp3/internal/http2/Header;
  81. sget-object v2, Lokhttp3/internal/http2/Header;->RESPONSE_STATUS:Lokio/ByteString;
  82. const-string v4, "204"
  83. invoke-direct {v1, v2, v4}, Lokhttp3/internal/http2/Header;-><init>(Lokio/ByteString;Ljava/lang/String;)V
  84. const/16 v2, 0x8
  85. aput-object v1, v0, v2
  86. new-instance v1, Lokhttp3/internal/http2/Header;
  87. sget-object v2, Lokhttp3/internal/http2/Header;->RESPONSE_STATUS:Lokio/ByteString;
  88. const-string v4, "206"
  89. invoke-direct {v1, v2, v4}, Lokhttp3/internal/http2/Header;-><init>(Lokio/ByteString;Ljava/lang/String;)V
  90. const/16 v2, 0x9
  91. aput-object v1, v0, v2
  92. new-instance v1, Lokhttp3/internal/http2/Header;
  93. sget-object v2, Lokhttp3/internal/http2/Header;->RESPONSE_STATUS:Lokio/ByteString;
  94. const-string v4, "304"
  95. invoke-direct {v1, v2, v4}, Lokhttp3/internal/http2/Header;-><init>(Lokio/ByteString;Ljava/lang/String;)V
  96. const/16 v2, 0xa
  97. aput-object v1, v0, v2
  98. new-instance v1, Lokhttp3/internal/http2/Header;
  99. sget-object v2, Lokhttp3/internal/http2/Header;->RESPONSE_STATUS:Lokio/ByteString;
  100. const-string v4, "400"
  101. invoke-direct {v1, v2, v4}, Lokhttp3/internal/http2/Header;-><init>(Lokio/ByteString;Ljava/lang/String;)V
  102. const/16 v2, 0xb
  103. aput-object v1, v0, v2
  104. new-instance v1, Lokhttp3/internal/http2/Header;
  105. sget-object v2, Lokhttp3/internal/http2/Header;->RESPONSE_STATUS:Lokio/ByteString;
  106. const-string v4, "404"
  107. invoke-direct {v1, v2, v4}, Lokhttp3/internal/http2/Header;-><init>(Lokio/ByteString;Ljava/lang/String;)V
  108. const/16 v2, 0xc
  109. aput-object v1, v0, v2
  110. new-instance v1, Lokhttp3/internal/http2/Header;
  111. sget-object v2, Lokhttp3/internal/http2/Header;->RESPONSE_STATUS:Lokio/ByteString;
  112. const-string v4, "500"
  113. invoke-direct {v1, v2, v4}, Lokhttp3/internal/http2/Header;-><init>(Lokio/ByteString;Ljava/lang/String;)V
  114. const/16 v2, 0xd
  115. aput-object v1, v0, v2
  116. new-instance v1, Lokhttp3/internal/http2/Header;
  117. const-string v2, "accept-charset"
  118. invoke-direct {v1, v2, v3}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
  119. const/16 v2, 0xe
  120. aput-object v1, v0, v2
  121. new-instance v1, Lokhttp3/internal/http2/Header;
  122. const-string v2, "accept-encoding"
  123. const-string v4, "gzip, deflate"
  124. invoke-direct {v1, v2, v4}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
  125. const/16 v2, 0xf
  126. aput-object v1, v0, v2
  127. new-instance v1, Lokhttp3/internal/http2/Header;
  128. const-string v2, "accept-language"
  129. invoke-direct {v1, v2, v3}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
  130. const/16 v2, 0x10
  131. aput-object v1, v0, v2
  132. new-instance v1, Lokhttp3/internal/http2/Header;
  133. const-string v2, "accept-ranges"
  134. invoke-direct {v1, v2, v3}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
  135. const/16 v2, 0x11
  136. aput-object v1, v0, v2
  137. new-instance v1, Lokhttp3/internal/http2/Header;
  138. const-string v2, "accept"
  139. invoke-direct {v1, v2, v3}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
  140. const/16 v2, 0x12
  141. aput-object v1, v0, v2
  142. new-instance v1, Lokhttp3/internal/http2/Header;
  143. const-string v2, "access-control-allow-origin"
  144. invoke-direct {v1, v2, v3}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
  145. const/16 v2, 0x13
  146. aput-object v1, v0, v2
  147. new-instance v1, Lokhttp3/internal/http2/Header;
  148. const-string v2, "age"
  149. invoke-direct {v1, v2, v3}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
  150. const/16 v2, 0x14
  151. aput-object v1, v0, v2
  152. new-instance v1, Lokhttp3/internal/http2/Header;
  153. const-string v2, "allow"
  154. invoke-direct {v1, v2, v3}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
  155. const/16 v2, 0x15
  156. aput-object v1, v0, v2
  157. new-instance v1, Lokhttp3/internal/http2/Header;
  158. const-string v2, "authorization"
  159. invoke-direct {v1, v2, v3}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
  160. const/16 v2, 0x16
  161. aput-object v1, v0, v2
  162. new-instance v1, Lokhttp3/internal/http2/Header;
  163. const-string v2, "cache-control"
  164. invoke-direct {v1, v2, v3}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
  165. const/16 v2, 0x17
  166. aput-object v1, v0, v2
  167. new-instance v1, Lokhttp3/internal/http2/Header;
  168. const-string v2, "content-disposition"
  169. invoke-direct {v1, v2, v3}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
  170. const/16 v2, 0x18
  171. aput-object v1, v0, v2
  172. new-instance v1, Lokhttp3/internal/http2/Header;
  173. const-string v2, "content-encoding"
  174. invoke-direct {v1, v2, v3}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
  175. const/16 v2, 0x19
  176. aput-object v1, v0, v2
  177. new-instance v1, Lokhttp3/internal/http2/Header;
  178. const-string v2, "content-language"
  179. invoke-direct {v1, v2, v3}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
  180. const/16 v2, 0x1a
  181. aput-object v1, v0, v2
  182. new-instance v1, Lokhttp3/internal/http2/Header;
  183. const-string v2, "content-length"
  184. invoke-direct {v1, v2, v3}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
  185. const/16 v2, 0x1b
  186. aput-object v1, v0, v2
  187. new-instance v1, Lokhttp3/internal/http2/Header;
  188. const-string v2, "content-location"
  189. invoke-direct {v1, v2, v3}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
  190. const/16 v2, 0x1c
  191. aput-object v1, v0, v2
  192. new-instance v1, Lokhttp3/internal/http2/Header;
  193. const-string v2, "content-range"
  194. invoke-direct {v1, v2, v3}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
  195. const/16 v2, 0x1d
  196. aput-object v1, v0, v2
  197. new-instance v1, Lokhttp3/internal/http2/Header;
  198. const-string v2, "content-type"
  199. invoke-direct {v1, v2, v3}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
  200. const/16 v2, 0x1e
  201. aput-object v1, v0, v2
  202. new-instance v1, Lokhttp3/internal/http2/Header;
  203. const-string v2, "cookie"
  204. invoke-direct {v1, v2, v3}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
  205. const/16 v2, 0x1f
  206. aput-object v1, v0, v2
  207. new-instance v1, Lokhttp3/internal/http2/Header;
  208. const-string v2, "date"
  209. invoke-direct {v1, v2, v3}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
  210. const/16 v2, 0x20
  211. aput-object v1, v0, v2
  212. new-instance v1, Lokhttp3/internal/http2/Header;
  213. const-string v2, "etag"
  214. invoke-direct {v1, v2, v3}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
  215. const/16 v2, 0x21
  216. aput-object v1, v0, v2
  217. new-instance v1, Lokhttp3/internal/http2/Header;
  218. const-string v2, "expect"
  219. invoke-direct {v1, v2, v3}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
  220. const/16 v2, 0x22
  221. aput-object v1, v0, v2
  222. new-instance v1, Lokhttp3/internal/http2/Header;
  223. const-string v2, "expires"
  224. invoke-direct {v1, v2, v3}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
  225. const/16 v2, 0x23
  226. aput-object v1, v0, v2
  227. new-instance v1, Lokhttp3/internal/http2/Header;
  228. const-string v2, "from"
  229. invoke-direct {v1, v2, v3}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
  230. const/16 v2, 0x24
  231. aput-object v1, v0, v2
  232. new-instance v1, Lokhttp3/internal/http2/Header;
  233. const-string v2, "host"
  234. invoke-direct {v1, v2, v3}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
  235. const/16 v2, 0x25
  236. aput-object v1, v0, v2
  237. new-instance v1, Lokhttp3/internal/http2/Header;
  238. const-string v2, "if-match"
  239. invoke-direct {v1, v2, v3}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
  240. const/16 v2, 0x26
  241. aput-object v1, v0, v2
  242. new-instance v1, Lokhttp3/internal/http2/Header;
  243. const-string v2, "if-modified-since"
  244. invoke-direct {v1, v2, v3}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
  245. const/16 v2, 0x27
  246. aput-object v1, v0, v2
  247. new-instance v1, Lokhttp3/internal/http2/Header;
  248. const-string v2, "if-none-match"
  249. invoke-direct {v1, v2, v3}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
  250. const/16 v2, 0x28
  251. aput-object v1, v0, v2
  252. new-instance v1, Lokhttp3/internal/http2/Header;
  253. const-string v2, "if-range"
  254. invoke-direct {v1, v2, v3}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
  255. const/16 v2, 0x29
  256. aput-object v1, v0, v2
  257. new-instance v1, Lokhttp3/internal/http2/Header;
  258. const-string v2, "if-unmodified-since"
  259. invoke-direct {v1, v2, v3}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
  260. const/16 v2, 0x2a
  261. aput-object v1, v0, v2
  262. new-instance v1, Lokhttp3/internal/http2/Header;
  263. const-string v2, "last-modified"
  264. invoke-direct {v1, v2, v3}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
  265. const/16 v2, 0x2b
  266. aput-object v1, v0, v2
  267. new-instance v1, Lokhttp3/internal/http2/Header;
  268. const-string v2, "link"
  269. invoke-direct {v1, v2, v3}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
  270. const/16 v2, 0x2c
  271. aput-object v1, v0, v2
  272. new-instance v1, Lokhttp3/internal/http2/Header;
  273. const-string v2, "location"
  274. invoke-direct {v1, v2, v3}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
  275. const/16 v2, 0x2d
  276. aput-object v1, v0, v2
  277. new-instance v1, Lokhttp3/internal/http2/Header;
  278. const-string v2, "max-forwards"
  279. invoke-direct {v1, v2, v3}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
  280. const/16 v2, 0x2e
  281. aput-object v1, v0, v2
  282. new-instance v1, Lokhttp3/internal/http2/Header;
  283. const-string v2, "proxy-authenticate"
  284. invoke-direct {v1, v2, v3}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
  285. const/16 v2, 0x2f
  286. aput-object v1, v0, v2
  287. new-instance v1, Lokhttp3/internal/http2/Header;
  288. const-string v2, "proxy-authorization"
  289. invoke-direct {v1, v2, v3}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
  290. const/16 v2, 0x30
  291. aput-object v1, v0, v2
  292. new-instance v1, Lokhttp3/internal/http2/Header;
  293. const-string v2, "range"
  294. invoke-direct {v1, v2, v3}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
  295. const/16 v2, 0x31
  296. aput-object v1, v0, v2
  297. new-instance v1, Lokhttp3/internal/http2/Header;
  298. const-string v2, "referer"
  299. invoke-direct {v1, v2, v3}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
  300. const/16 v2, 0x32
  301. aput-object v1, v0, v2
  302. new-instance v1, Lokhttp3/internal/http2/Header;
  303. const-string v2, "refresh"
  304. invoke-direct {v1, v2, v3}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
  305. const/16 v2, 0x33
  306. aput-object v1, v0, v2
  307. new-instance v1, Lokhttp3/internal/http2/Header;
  308. const-string v2, "retry-after"
  309. invoke-direct {v1, v2, v3}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
  310. const/16 v2, 0x34
  311. aput-object v1, v0, v2
  312. new-instance v1, Lokhttp3/internal/http2/Header;
  313. const-string v2, "server"
  314. invoke-direct {v1, v2, v3}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
  315. const/16 v2, 0x35
  316. aput-object v1, v0, v2
  317. new-instance v1, Lokhttp3/internal/http2/Header;
  318. const-string v2, "set-cookie"
  319. invoke-direct {v1, v2, v3}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
  320. const/16 v2, 0x36
  321. aput-object v1, v0, v2
  322. new-instance v1, Lokhttp3/internal/http2/Header;
  323. const-string v2, "strict-transport-security"
  324. invoke-direct {v1, v2, v3}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
  325. const/16 v2, 0x37
  326. aput-object v1, v0, v2
  327. new-instance v1, Lokhttp3/internal/http2/Header;
  328. const-string v2, "transfer-encoding"
  329. invoke-direct {v1, v2, v3}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
  330. const/16 v2, 0x38
  331. aput-object v1, v0, v2
  332. new-instance v1, Lokhttp3/internal/http2/Header;
  333. const-string v2, "user-agent"
  334. invoke-direct {v1, v2, v3}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
  335. const/16 v2, 0x39
  336. aput-object v1, v0, v2
  337. new-instance v1, Lokhttp3/internal/http2/Header;
  338. const-string v2, "vary"
  339. invoke-direct {v1, v2, v3}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
  340. const/16 v2, 0x3a
  341. aput-object v1, v0, v2
  342. new-instance v1, Lokhttp3/internal/http2/Header;
  343. const-string v2, "via"
  344. invoke-direct {v1, v2, v3}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
  345. const/16 v2, 0x3b
  346. aput-object v1, v0, v2
  347. new-instance v1, Lokhttp3/internal/http2/Header;
  348. const-string v2, "www-authenticate"
  349. invoke-direct {v1, v2, v3}, Lokhttp3/internal/http2/Header;-><init>(Ljava/lang/String;Ljava/lang/String;)V
  350. const/16 v2, 0x3c
  351. aput-object v1, v0, v2
  352. sput-object v0, Lokhttp3/internal/http2/Hpack;->STATIC_HEADER_TABLE:[Lokhttp3/internal/http2/Header;
  353. invoke-static {}, Lokhttp3/internal/http2/Hpack;->nameToFirstIndex()Ljava/util/Map;
  354. move-result-object v0
  355. sput-object v0, Lokhttp3/internal/http2/Hpack;->NAME_TO_FIRST_INDEX:Ljava/util/Map;
  356. return-void
  357. .end method
  358. .method private constructor <init>()V
  359. .locals 0
  360. invoke-direct {p0}, Ljava/lang/Object;-><init>()V
  361. return-void
  362. .end method
  363. .method static checkLowercase(Lokio/ByteString;)Lokio/ByteString;
  364. .locals 4
  365. .annotation system Ldalvik/annotation/Throws;
  366. value = {
  367. Ljava/io/IOException;
  368. }
  369. .end annotation
  370. invoke-virtual {p0}, Lokio/ByteString;->size()I
  371. move-result v0
  372. const/4 v1, 0x0
  373. :goto_0
  374. if-ge v1, v0, :cond_2
  375. invoke-virtual {p0, v1}, Lokio/ByteString;->getByte(I)B
  376. move-result v2
  377. const/16 v3, 0x41
  378. if-lt v2, v3, :cond_1
  379. const/16 v3, 0x5a
  380. if-le v2, v3, :cond_0
  381. goto :goto_1
  382. :cond_0
  383. new-instance v0, Ljava/io/IOException;
  384. new-instance v1, Ljava/lang/StringBuilder;
  385. invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
  386. const-string v2, "PROTOCOL_ERROR response malformed: mixed case name: "
  387. invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  388. invoke-virtual {p0}, Lokio/ByteString;->utf8()Ljava/lang/String;
  389. move-result-object p0
  390. invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  391. invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
  392. move-result-object p0
  393. invoke-direct {v0, p0}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
  394. throw v0
  395. :cond_1
  396. :goto_1
  397. add-int/lit8 v1, v1, 0x1
  398. goto :goto_0
  399. :cond_2
  400. return-object p0
  401. .end method
  402. .method private static nameToFirstIndex()Ljava/util/Map;
  403. .locals 4
  404. .annotation system Ldalvik/annotation/Signature;
  405. value = {
  406. "()",
  407. "Ljava/util/Map<",
  408. "Lokio/ByteString;",
  409. "Ljava/lang/Integer;",
  410. ">;"
  411. }
  412. .end annotation
  413. new-instance v0, Ljava/util/LinkedHashMap;
  414. sget-object v1, Lokhttp3/internal/http2/Hpack;->STATIC_HEADER_TABLE:[Lokhttp3/internal/http2/Header;
  415. array-length v1, v1
  416. invoke-direct {v0, v1}, Ljava/util/LinkedHashMap;-><init>(I)V
  417. const/4 v1, 0x0
  418. :goto_0
  419. sget-object v2, Lokhttp3/internal/http2/Hpack;->STATIC_HEADER_TABLE:[Lokhttp3/internal/http2/Header;
  420. array-length v3, v2
  421. if-ge v1, v3, :cond_1
  422. aget-object v2, v2, v1
  423. iget-object v2, v2, Lokhttp3/internal/http2/Header;->name:Lokio/ByteString;
  424. invoke-interface {v0, v2}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z
  425. move-result v2
  426. if-nez v2, :cond_0
  427. sget-object v2, Lokhttp3/internal/http2/Hpack;->STATIC_HEADER_TABLE:[Lokhttp3/internal/http2/Header;
  428. aget-object v2, v2, v1
  429. iget-object v2, v2, Lokhttp3/internal/http2/Header;->name:Lokio/ByteString;
  430. invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
  431. move-result-object v3
  432. invoke-interface {v0, v2, v3}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
  433. :cond_0
  434. add-int/lit8 v1, v1, 0x1
  435. goto :goto_0
  436. :cond_1
  437. invoke-static {v0}, Ljava/util/Collections;->unmodifiableMap(Ljava/util/Map;)Ljava/util/Map;
  438. move-result-object v0
  439. return-object v0
  440. .end method