private void removeHeader0(int h, int i, String name) { HeaderEntry e = entries[i]; if (e == null) { return; } for (; ; ) { if (e.hash == h && eq(name, e.key)) { e.remove(); HeaderEntry next = e.next; if (next != null) { entries[i] = next; e = next; } else { entries[i] = null; return; } } else { break; } } for (; ; ) { HeaderEntry next = e.next; if (next == null) { break; } if (next.hash == h && eq(name, next.key)) { e.next = next.next; next.remove(); } else { e = next; } } }
private void addHeader0(int h, int i, final String name, final String value) { // Update the hash table. HeaderEntry e = entries[i]; HeaderEntry newEntry; entries[i] = newEntry = new HeaderEntry(h, name, value); newEntry.next = e; // Update the linked list. newEntry.addBefore(head); }