Hpack$Writer.smali 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761
  1. .class final Lokhttp3/internal/http2/Hpack$Writer;
  2. .super Ljava/lang/Object;
  3. .source ""
  4. # annotations
  5. .annotation system Ldalvik/annotation/EnclosingClass;
  6. value = Lokhttp3/internal/http2/Hpack;
  7. .end annotation
  8. .annotation system Ldalvik/annotation/InnerClass;
  9. accessFlags = 0x18
  10. name = "Writer"
  11. .end annotation
  12. # static fields
  13. .field private static final SETTINGS_HEADER_TABLE_SIZE:I = 0x1000
  14. .field private static final SETTINGS_HEADER_TABLE_SIZE_LIMIT:I = 0x4000
  15. # instance fields
  16. .field dynamicTable:[Lokhttp3/internal/http2/Header;
  17. .field dynamicTableByteCount:I
  18. .field private emitDynamicTableSizeUpdate:Z
  19. .field headerCount:I
  20. .field headerTableSizeSetting:I
  21. .field maxDynamicTableByteCount:I
  22. .field nextHeaderIndex:I
  23. .field private final out:Lokio/Buffer;
  24. .field private smallestHeaderTableSizeSetting:I
  25. .field private final useCompression:Z
  26. # direct methods
  27. .method constructor <init>(IZLokio/Buffer;)V
  28. .locals 1
  29. invoke-direct {p0}, Ljava/lang/Object;-><init>()V
  30. const v0, 0x7fffffff
  31. iput v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->smallestHeaderTableSizeSetting:I
  32. const/16 v0, 0x8
  33. new-array v0, v0, [Lokhttp3/internal/http2/Header;
  34. iput-object v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTable:[Lokhttp3/internal/http2/Header;
  35. iget-object v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTable:[Lokhttp3/internal/http2/Header;
  36. array-length v0, v0
  37. add-int/lit8 v0, v0, -0x1
  38. iput v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->nextHeaderIndex:I
  39. const/4 v0, 0x0
  40. iput v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->headerCount:I
  41. iput v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTableByteCount:I
  42. iput p1, p0, Lokhttp3/internal/http2/Hpack$Writer;->headerTableSizeSetting:I
  43. iput p1, p0, Lokhttp3/internal/http2/Hpack$Writer;->maxDynamicTableByteCount:I
  44. iput-boolean p2, p0, Lokhttp3/internal/http2/Hpack$Writer;->useCompression:Z
  45. iput-object p3, p0, Lokhttp3/internal/http2/Hpack$Writer;->out:Lokio/Buffer;
  46. return-void
  47. .end method
  48. .method constructor <init>(Lokio/Buffer;)V
  49. .locals 2
  50. const/16 v0, 0x1000
  51. const/4 v1, 0x1
  52. invoke-direct {p0, v0, v1, p1}, Lokhttp3/internal/http2/Hpack$Writer;-><init>(IZLokio/Buffer;)V
  53. return-void
  54. .end method
  55. .method private adjustDynamicTableByteCount()V
  56. .locals 2
  57. iget v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->maxDynamicTableByteCount:I
  58. iget v1, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTableByteCount:I
  59. if-ge v0, v1, :cond_1
  60. if-nez v0, :cond_0
  61. invoke-direct {p0}, Lokhttp3/internal/http2/Hpack$Writer;->clearDynamicTable()V
  62. goto :goto_0
  63. :cond_0
  64. sub-int/2addr v1, v0
  65. invoke-direct {p0, v1}, Lokhttp3/internal/http2/Hpack$Writer;->evictToRecoverBytes(I)I
  66. :cond_1
  67. :goto_0
  68. return-void
  69. .end method
  70. .method private clearDynamicTable()V
  71. .locals 2
  72. iget-object v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTable:[Lokhttp3/internal/http2/Header;
  73. const/4 v1, 0x0
  74. invoke-static {v0, v1}, Ljava/util/Arrays;->fill([Ljava/lang/Object;Ljava/lang/Object;)V
  75. iget-object v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTable:[Lokhttp3/internal/http2/Header;
  76. array-length v0, v0
  77. add-int/lit8 v0, v0, -0x1
  78. iput v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->nextHeaderIndex:I
  79. const/4 v0, 0x0
  80. iput v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->headerCount:I
  81. iput v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTableByteCount:I
  82. return-void
  83. .end method
  84. .method private evictToRecoverBytes(I)I
  85. .locals 4
  86. const/4 v0, 0x0
  87. if-lez p1, :cond_1
  88. iget-object v1, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTable:[Lokhttp3/internal/http2/Header;
  89. array-length v1, v1
  90. add-int/lit8 v1, v1, -0x1
  91. :goto_0
  92. iget v2, p0, Lokhttp3/internal/http2/Hpack$Writer;->nextHeaderIndex:I
  93. if-lt v1, v2, :cond_0
  94. if-lez p1, :cond_0
  95. iget-object v2, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTable:[Lokhttp3/internal/http2/Header;
  96. aget-object v3, v2, v1
  97. iget v3, v3, Lokhttp3/internal/http2/Header;->hpackSize:I
  98. sub-int/2addr p1, v3
  99. iget v3, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTableByteCount:I
  100. aget-object v2, v2, v1
  101. iget v2, v2, Lokhttp3/internal/http2/Header;->hpackSize:I
  102. sub-int/2addr v3, v2
  103. iput v3, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTableByteCount:I
  104. iget v2, p0, Lokhttp3/internal/http2/Hpack$Writer;->headerCount:I
  105. add-int/lit8 v2, v2, -0x1
  106. iput v2, p0, Lokhttp3/internal/http2/Hpack$Writer;->headerCount:I
  107. add-int/lit8 v0, v0, 0x1
  108. add-int/lit8 v1, v1, -0x1
  109. goto :goto_0
  110. :cond_0
  111. iget-object p1, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTable:[Lokhttp3/internal/http2/Header;
  112. iget v1, p0, Lokhttp3/internal/http2/Hpack$Writer;->nextHeaderIndex:I
  113. add-int/lit8 v2, v1, 0x1
  114. add-int/lit8 v1, v1, 0x1
  115. add-int/2addr v1, v0
  116. iget v3, p0, Lokhttp3/internal/http2/Hpack$Writer;->headerCount:I
  117. invoke-static {p1, v2, p1, v1, v3}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
  118. iget-object p1, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTable:[Lokhttp3/internal/http2/Header;
  119. iget v1, p0, Lokhttp3/internal/http2/Hpack$Writer;->nextHeaderIndex:I
  120. add-int/lit8 v2, v1, 0x1
  121. add-int/lit8 v1, v1, 0x1
  122. add-int/2addr v1, v0
  123. const/4 v3, 0x0
  124. invoke-static {p1, v2, v1, v3}, Ljava/util/Arrays;->fill([Ljava/lang/Object;IILjava/lang/Object;)V
  125. iget p1, p0, Lokhttp3/internal/http2/Hpack$Writer;->nextHeaderIndex:I
  126. add-int/2addr p1, v0
  127. iput p1, p0, Lokhttp3/internal/http2/Hpack$Writer;->nextHeaderIndex:I
  128. :cond_1
  129. return v0
  130. .end method
  131. .method private insertIntoDynamicTable(Lokhttp3/internal/http2/Header;)V
  132. .locals 6
  133. iget v0, p1, Lokhttp3/internal/http2/Header;->hpackSize:I
  134. iget v1, p0, Lokhttp3/internal/http2/Hpack$Writer;->maxDynamicTableByteCount:I
  135. if-le v0, v1, :cond_0
  136. invoke-direct {p0}, Lokhttp3/internal/http2/Hpack$Writer;->clearDynamicTable()V
  137. return-void
  138. :cond_0
  139. iget v2, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTableByteCount:I
  140. add-int/2addr v2, v0
  141. sub-int/2addr v2, v1
  142. invoke-direct {p0, v2}, Lokhttp3/internal/http2/Hpack$Writer;->evictToRecoverBytes(I)I
  143. iget v1, p0, Lokhttp3/internal/http2/Hpack$Writer;->headerCount:I
  144. add-int/lit8 v1, v1, 0x1
  145. iget-object v2, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTable:[Lokhttp3/internal/http2/Header;
  146. array-length v3, v2
  147. if-le v1, v3, :cond_1
  148. array-length v1, v2
  149. mul-int/lit8 v1, v1, 0x2
  150. new-array v1, v1, [Lokhttp3/internal/http2/Header;
  151. const/4 v3, 0x0
  152. array-length v4, v2
  153. array-length v5, v2
  154. invoke-static {v2, v3, v1, v4, v5}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
  155. iget-object v2, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTable:[Lokhttp3/internal/http2/Header;
  156. array-length v2, v2
  157. add-int/lit8 v2, v2, -0x1
  158. iput v2, p0, Lokhttp3/internal/http2/Hpack$Writer;->nextHeaderIndex:I
  159. iput-object v1, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTable:[Lokhttp3/internal/http2/Header;
  160. :cond_1
  161. iget v1, p0, Lokhttp3/internal/http2/Hpack$Writer;->nextHeaderIndex:I
  162. add-int/lit8 v2, v1, -0x1
  163. iput v2, p0, Lokhttp3/internal/http2/Hpack$Writer;->nextHeaderIndex:I
  164. iget-object v2, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTable:[Lokhttp3/internal/http2/Header;
  165. aput-object p1, v2, v1
  166. iget p1, p0, Lokhttp3/internal/http2/Hpack$Writer;->headerCount:I
  167. add-int/lit8 p1, p1, 0x1
  168. iput p1, p0, Lokhttp3/internal/http2/Hpack$Writer;->headerCount:I
  169. iget p1, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTableByteCount:I
  170. add-int/2addr p1, v0
  171. iput p1, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTableByteCount:I
  172. return-void
  173. .end method
  174. # virtual methods
  175. .method setHeaderTableSizeSetting(I)V
  176. .locals 1
  177. iput p1, p0, Lokhttp3/internal/http2/Hpack$Writer;->headerTableSizeSetting:I
  178. const/16 v0, 0x4000
  179. invoke-static {p1, v0}, Ljava/lang/Math;->min(II)I
  180. move-result p1
  181. iget v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->maxDynamicTableByteCount:I
  182. if-ne v0, p1, :cond_0
  183. return-void
  184. :cond_0
  185. if-ge p1, v0, :cond_1
  186. iget v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->smallestHeaderTableSizeSetting:I
  187. invoke-static {v0, p1}, Ljava/lang/Math;->min(II)I
  188. move-result v0
  189. iput v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->smallestHeaderTableSizeSetting:I
  190. :cond_1
  191. const/4 v0, 0x1
  192. iput-boolean v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->emitDynamicTableSizeUpdate:Z
  193. iput p1, p0, Lokhttp3/internal/http2/Hpack$Writer;->maxDynamicTableByteCount:I
  194. invoke-direct {p0}, Lokhttp3/internal/http2/Hpack$Writer;->adjustDynamicTableByteCount()V
  195. return-void
  196. .end method
  197. .method writeByteString(Lokio/ByteString;)V
  198. .locals 3
  199. .annotation system Ldalvik/annotation/Throws;
  200. value = {
  201. Ljava/io/IOException;
  202. }
  203. .end annotation
  204. iget-boolean v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->useCompression:Z
  205. const/16 v1, 0x7f
  206. if-eqz v0, :cond_0
  207. invoke-static {}, Lokhttp3/internal/http2/Huffman;->get()Lokhttp3/internal/http2/Huffman;
  208. move-result-object v0
  209. invoke-virtual {v0, p1}, Lokhttp3/internal/http2/Huffman;->encodedLength(Lokio/ByteString;)I
  210. move-result v0
  211. invoke-virtual {p1}, Lokio/ByteString;->size()I
  212. move-result v2
  213. if-ge v0, v2, :cond_0
  214. new-instance v0, Lokio/Buffer;
  215. invoke-direct {v0}, Lokio/Buffer;-><init>()V
  216. invoke-static {}, Lokhttp3/internal/http2/Huffman;->get()Lokhttp3/internal/http2/Huffman;
  217. move-result-object v2
  218. invoke-virtual {v2, p1, v0}, Lokhttp3/internal/http2/Huffman;->encode(Lokio/ByteString;Lokio/BufferedSink;)V
  219. invoke-virtual {v0}, Lokio/Buffer;->readByteString()Lokio/ByteString;
  220. move-result-object p1
  221. invoke-virtual {p1}, Lokio/ByteString;->size()I
  222. move-result v0
  223. const/16 v2, 0x80
  224. goto :goto_0
  225. :cond_0
  226. invoke-virtual {p1}, Lokio/ByteString;->size()I
  227. move-result v0
  228. const/4 v2, 0x0
  229. :goto_0
  230. invoke-virtual {p0, v0, v1, v2}, Lokhttp3/internal/http2/Hpack$Writer;->writeInt(III)V
  231. iget-object v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->out:Lokio/Buffer;
  232. invoke-virtual {v0, p1}, Lokio/Buffer;->write(Lokio/ByteString;)Lokio/Buffer;
  233. return-void
  234. .end method
  235. .method writeHeaders(Ljava/util/List;)V
  236. .locals 13
  237. .annotation system Ldalvik/annotation/Signature;
  238. value = {
  239. "(",
  240. "Ljava/util/List<",
  241. "Lokhttp3/internal/http2/Header;",
  242. ">;)V"
  243. }
  244. .end annotation
  245. .annotation system Ldalvik/annotation/Throws;
  246. value = {
  247. Ljava/io/IOException;
  248. }
  249. .end annotation
  250. iget-boolean v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->emitDynamicTableSizeUpdate:Z
  251. const/4 v1, 0x0
  252. if-eqz v0, :cond_1
  253. iget v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->smallestHeaderTableSizeSetting:I
  254. iget v2, p0, Lokhttp3/internal/http2/Hpack$Writer;->maxDynamicTableByteCount:I
  255. const/16 v3, 0x20
  256. const/16 v4, 0x1f
  257. if-ge v0, v2, :cond_0
  258. invoke-virtual {p0, v0, v4, v3}, Lokhttp3/internal/http2/Hpack$Writer;->writeInt(III)V
  259. :cond_0
  260. iput-boolean v1, p0, Lokhttp3/internal/http2/Hpack$Writer;->emitDynamicTableSizeUpdate:Z
  261. const v0, 0x7fffffff
  262. iput v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->smallestHeaderTableSizeSetting:I
  263. iget v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->maxDynamicTableByteCount:I
  264. invoke-virtual {p0, v0, v4, v3}, Lokhttp3/internal/http2/Hpack$Writer;->writeInt(III)V
  265. :cond_1
  266. invoke-interface {p1}, Ljava/util/List;->size()I
  267. move-result v0
  268. const/4 v2, 0x0
  269. :goto_0
  270. if-ge v2, v0, :cond_b
  271. invoke-interface {p1, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;
  272. move-result-object v3
  273. check-cast v3, Lokhttp3/internal/http2/Header;
  274. iget-object v4, v3, Lokhttp3/internal/http2/Header;->name:Lokio/ByteString;
  275. invoke-virtual {v4}, Lokio/ByteString;->toAsciiLowercase()Lokio/ByteString;
  276. move-result-object v4
  277. iget-object v5, v3, Lokhttp3/internal/http2/Header;->value:Lokio/ByteString;
  278. sget-object v6, Lokhttp3/internal/http2/Hpack;->NAME_TO_FIRST_INDEX:Ljava/util/Map;
  279. invoke-interface {v6, v4}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
  280. move-result-object v6
  281. check-cast v6, Ljava/lang/Integer;
  282. const/4 v7, -0x1
  283. const/4 v8, 0x1
  284. if-eqz v6, :cond_4
  285. invoke-virtual {v6}, Ljava/lang/Integer;->intValue()I
  286. move-result v6
  287. add-int/2addr v6, v8
  288. if-le v6, v8, :cond_3
  289. const/16 v9, 0x8
  290. if-ge v6, v9, :cond_3
  291. sget-object v9, Lokhttp3/internal/http2/Hpack;->STATIC_HEADER_TABLE:[Lokhttp3/internal/http2/Header;
  292. add-int/lit8 v10, v6, -0x1
  293. aget-object v9, v9, v10
  294. iget-object v9, v9, Lokhttp3/internal/http2/Header;->value:Lokio/ByteString;
  295. invoke-static {v9, v5}, Lokhttp3/internal/Util;->equal(Ljava/lang/Object;Ljava/lang/Object;)Z
  296. move-result v9
  297. if-eqz v9, :cond_2
  298. move v9, v6
  299. goto :goto_1
  300. :cond_2
  301. sget-object v9, Lokhttp3/internal/http2/Hpack;->STATIC_HEADER_TABLE:[Lokhttp3/internal/http2/Header;
  302. aget-object v9, v9, v6
  303. iget-object v9, v9, Lokhttp3/internal/http2/Header;->value:Lokio/ByteString;
  304. invoke-static {v9, v5}, Lokhttp3/internal/Util;->equal(Ljava/lang/Object;Ljava/lang/Object;)Z
  305. move-result v9
  306. if-eqz v9, :cond_3
  307. add-int/lit8 v9, v6, 0x1
  308. move v12, v9
  309. move v9, v6
  310. move v6, v12
  311. goto :goto_1
  312. :cond_3
  313. move v9, v6
  314. const/4 v6, -0x1
  315. goto :goto_1
  316. :cond_4
  317. const/4 v6, -0x1
  318. const/4 v9, -0x1
  319. :goto_1
  320. if-ne v6, v7, :cond_7
  321. iget v10, p0, Lokhttp3/internal/http2/Hpack$Writer;->nextHeaderIndex:I
  322. add-int/2addr v10, v8
  323. iget-object v8, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTable:[Lokhttp3/internal/http2/Header;
  324. array-length v8, v8
  325. :goto_2
  326. if-ge v10, v8, :cond_7
  327. iget-object v11, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTable:[Lokhttp3/internal/http2/Header;
  328. aget-object v11, v11, v10
  329. iget-object v11, v11, Lokhttp3/internal/http2/Header;->name:Lokio/ByteString;
  330. invoke-static {v11, v4}, Lokhttp3/internal/Util;->equal(Ljava/lang/Object;Ljava/lang/Object;)Z
  331. move-result v11
  332. if-eqz v11, :cond_6
  333. iget-object v11, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTable:[Lokhttp3/internal/http2/Header;
  334. aget-object v11, v11, v10
  335. iget-object v11, v11, Lokhttp3/internal/http2/Header;->value:Lokio/ByteString;
  336. invoke-static {v11, v5}, Lokhttp3/internal/Util;->equal(Ljava/lang/Object;Ljava/lang/Object;)Z
  337. move-result v11
  338. if-eqz v11, :cond_5
  339. iget v6, p0, Lokhttp3/internal/http2/Hpack$Writer;->nextHeaderIndex:I
  340. sub-int/2addr v10, v6
  341. sget-object v6, Lokhttp3/internal/http2/Hpack;->STATIC_HEADER_TABLE:[Lokhttp3/internal/http2/Header;
  342. array-length v6, v6
  343. add-int/2addr v6, v10
  344. goto :goto_3
  345. :cond_5
  346. if-ne v9, v7, :cond_6
  347. iget v9, p0, Lokhttp3/internal/http2/Hpack$Writer;->nextHeaderIndex:I
  348. sub-int v9, v10, v9
  349. sget-object v11, Lokhttp3/internal/http2/Hpack;->STATIC_HEADER_TABLE:[Lokhttp3/internal/http2/Header;
  350. array-length v11, v11
  351. add-int/2addr v9, v11
  352. :cond_6
  353. add-int/lit8 v10, v10, 0x1
  354. goto :goto_2
  355. :cond_7
  356. :goto_3
  357. if-eq v6, v7, :cond_8
  358. const/16 v3, 0x7f
  359. const/16 v4, 0x80
  360. invoke-virtual {p0, v6, v3, v4}, Lokhttp3/internal/http2/Hpack$Writer;->writeInt(III)V
  361. goto :goto_5
  362. :cond_8
  363. const/16 v6, 0x40
  364. if-ne v9, v7, :cond_9
  365. iget-object v7, p0, Lokhttp3/internal/http2/Hpack$Writer;->out:Lokio/Buffer;
  366. invoke-virtual {v7, v6}, Lokio/Buffer;->writeByte(I)Lokio/Buffer;
  367. invoke-virtual {p0, v4}, Lokhttp3/internal/http2/Hpack$Writer;->writeByteString(Lokio/ByteString;)V
  368. :goto_4
  369. invoke-virtual {p0, v5}, Lokhttp3/internal/http2/Hpack$Writer;->writeByteString(Lokio/ByteString;)V
  370. invoke-direct {p0, v3}, Lokhttp3/internal/http2/Hpack$Writer;->insertIntoDynamicTable(Lokhttp3/internal/http2/Header;)V
  371. goto :goto_5
  372. :cond_9
  373. sget-object v7, Lokhttp3/internal/http2/Header;->PSEUDO_PREFIX:Lokio/ByteString;
  374. invoke-virtual {v4, v7}, Lokio/ByteString;->startsWith(Lokio/ByteString;)Z
  375. move-result v7
  376. if-eqz v7, :cond_a
  377. sget-object v7, Lokhttp3/internal/http2/Header;->TARGET_AUTHORITY:Lokio/ByteString;
  378. invoke-virtual {v7, v4}, Lokio/ByteString;->equals(Ljava/lang/Object;)Z
  379. move-result v4
  380. if-nez v4, :cond_a
  381. const/16 v3, 0xf
  382. invoke-virtual {p0, v9, v3, v1}, Lokhttp3/internal/http2/Hpack$Writer;->writeInt(III)V
  383. invoke-virtual {p0, v5}, Lokhttp3/internal/http2/Hpack$Writer;->writeByteString(Lokio/ByteString;)V
  384. goto :goto_5
  385. :cond_a
  386. const/16 v4, 0x3f
  387. invoke-virtual {p0, v9, v4, v6}, Lokhttp3/internal/http2/Hpack$Writer;->writeInt(III)V
  388. goto :goto_4
  389. :goto_5
  390. add-int/lit8 v2, v2, 0x1
  391. goto/16 :goto_0
  392. :cond_b
  393. return-void
  394. .end method
  395. .method writeInt(III)V
  396. .locals 1
  397. if-ge p1, p2, :cond_0
  398. iget-object p2, p0, Lokhttp3/internal/http2/Hpack$Writer;->out:Lokio/Buffer;
  399. or-int/2addr p1, p3
  400. :goto_0
  401. invoke-virtual {p2, p1}, Lokio/Buffer;->writeByte(I)Lokio/Buffer;
  402. return-void
  403. :cond_0
  404. iget-object v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->out:Lokio/Buffer;
  405. or-int/2addr p3, p2
  406. invoke-virtual {v0, p3}, Lokio/Buffer;->writeByte(I)Lokio/Buffer;
  407. sub-int/2addr p1, p2
  408. :goto_1
  409. const/16 p2, 0x80
  410. if-lt p1, p2, :cond_1
  411. and-int/lit8 p3, p1, 0x7f
  412. iget-object v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->out:Lokio/Buffer;
  413. or-int/2addr p2, p3
  414. invoke-virtual {v0, p2}, Lokio/Buffer;->writeByte(I)Lokio/Buffer;
  415. ushr-int/lit8 p1, p1, 0x7
  416. goto :goto_1
  417. :cond_1
  418. iget-object p2, p0, Lokhttp3/internal/http2/Hpack$Writer;->out:Lokio/Buffer;
  419. goto :goto_0
  420. .end method