| 307 | } |
| 308 | |
| 309 | private TableEntry findInTable(String headerName, String value) { |
| 310 | TableEntry[] staticTable = ENCODING_STATIC_TABLE.get(headerName); |
| 311 | if (staticTable != null) { |
| 312 | for (TableEntry st : staticTable) { |
| 313 | if (st.value != null && st.value.equals(value)) { // todo: some form of lookup? |
| 314 | return st; |
| 315 | } |
| 316 | } |
| 317 | } |
| 318 | List<TableEntry> dynamic = dynamicTable.get(headerName); |
| 319 | if (dynamic != null) { |
| 320 | for (TableEntry st : dynamic) { |
| 321 | if (st.value.equals(value)) { // todo: some form of lookup? |
| 322 | return st; |
| 323 | } |
| 324 | } |
| 325 | } |
| 326 | if (staticTable != null) { |
| 327 | return staticTable[0]; |
| 328 | } |
| 329 | return null; |
| 330 | } |
| 331 | |
| 332 | public void setMaxTableSize(int newSize) { |
| 333 | this.newMaxHeaderSize = newSize; |