private void resumeLiteralWithIndexing(Buffer input, DecodingCallback action) { if (!completeReading(input)) { return; } try { // // 1. (name, value) will be stored in the table as strings // 2. Most likely the callback will also create strings from them // ------------------------------------------------------------------------ // Let's create those string beforehand (and only once!) to benefit everyone // String n; String v = value.toString(); if (firstValueIndex) { HeaderTable.HeaderField f = table.get(intValue); n = f.name; action.onLiteralWithIndexing(intValue, n, v, valueHuffmanEncoded); } else { n = name.toString(); action.onLiteralWithIndexing(n, nameHuffmanEncoded, v, valueHuffmanEncoded); } table.put(n, v); } catch (IllegalArgumentException | IllegalStateException e) { throw new RuntimeException( new ProtocolException().initCause(e)); } finally { cleanUpAfterReading(); } }
private void resumeLiteralWithIndexing(Buffer input, DecodingCallback action) { if (!completeReading(input)) { return; } try { // // 1. (name, value) will be stored in the table as strings // 2. Most likely the callback will also create strings from them // ------------------------------------------------------------------------ // Let's create those string beforehand (and only once!) to benefit everyone // String n; String v = value.toString(); if (firstValueIndex) { HeaderTable.HeaderField f = table.get(intValue); n = f.name; action.onLiteralWithIndexing(intValue, n, v, valueHuffmanEncoded); } else { n = name.toString(); action.onLiteralWithIndexing(n, nameHuffmanEncoded, v, valueHuffmanEncoded); } table.put(n, v); } catch (IllegalArgumentException | IllegalStateException e) { throw new RuntimeException( new ProtocolException().initCause(e)); } finally { cleanUpAfterReading(); } }
private void resumeLiteralWithIndexing(Buffer input, DecodingCallback action) { if (!completeReading(input)) { return; } try { // // 1. (name, value) will be stored in the table as strings // 2. Most likely the callback will also create strings from them // ------------------------------------------------------------------------ // Let's create those string beforehand (and only once!) to benefit everyone // String n; String v = value.toString(); if (firstValueIndex) { HeaderTable.HeaderField f = table.get(intValue); n = f.name; action.onLiteralWithIndexing(intValue, n, v, valueHuffmanEncoded); } else { n = name.toString(); action.onLiteralWithIndexing(n, nameHuffmanEncoded, v, valueHuffmanEncoded); } table.put(n, v); } catch (IllegalArgumentException | IllegalStateException e) { throw new RuntimeException( new ProtocolException().initCause(e)); } finally { cleanUpAfterReading(); } }
private void resumeLiteralWithIndexing(Buffer input, DecodingCallback action) { if (!completeReading(input)) { return; } try { // // 1. (name, value) will be stored in the table as strings // 2. Most likely the callback will also create strings from them // ------------------------------------------------------------------------ // Let's create those string beforehand (and only once!) to benefit everyone // String n; String v = value.toString(); if (firstValueIndex) { HeaderTable.HeaderField f = table.get(intValue); n = f.name; action.onLiteralWithIndexing(intValue, n, v, valueHuffmanEncoded); } else { n = name.toString(); action.onLiteralWithIndexing(n, nameHuffmanEncoded, v, valueHuffmanEncoded); } table.put(n, v); } catch (IllegalArgumentException | IllegalStateException e) { throw new RuntimeException( new ProtocolException().initCause(e)); } finally { cleanUpAfterReading(); } }
private void resumeLiteralWithIndexing(Buffer input, DecodingCallback action) { if (!completeReading(input)) { return; } try { // // 1. (name, value) will be stored in the table as strings // 2. Most likely the callback will also create strings from them // ------------------------------------------------------------------------ // Let's create those string beforehand (and only once!) to benefit everyone // String n; String v = value.toString(); if (firstValueIndex) { HeaderTable.HeaderField f = table.get(intValue); n = f.name; action.onLiteralWithIndexing(intValue, n, v, valueHuffmanEncoded); } else { n = name.toString(); action.onLiteralWithIndexing(n, nameHuffmanEncoded, v, valueHuffmanEncoded); } table.put(n, v); } catch (IllegalArgumentException | IllegalStateException e) { throw new RuntimeException( new ProtocolException().initCause(e)); } finally { cleanUpAfterReading(); } }
private void resumeLiteralWithIndexing(Buffer input, DecodingCallback action) { if (!completeReading(input)) { return; } try { // // 1. (name, value) will be stored in the table as strings // 2. Most likely the callback will also create strings from them // ------------------------------------------------------------------------ // Let's create those string beforehand (and only once!) to benefit everyone // String n; String v = value.toString(); if (firstValueIndex) { HeaderTable.HeaderField f = table.get(intValue); n = f.name; action.onLiteralWithIndexing(intValue, n, v, valueHuffmanEncoded); } else { n = name.toString(); action.onLiteralWithIndexing(n, nameHuffmanEncoded, v, valueHuffmanEncoded); } table.put(n, v); } catch (IllegalArgumentException | IllegalStateException e) { throw new RuntimeException( new ProtocolException().initCause(e)); } finally { cleanUpAfterReading(); } }
private void resumeLiteralWithIndexing(Buffer input, DecodingCallback action) { if (!completeReading(input)) { return; } try { // // 1. (name, value) will be stored in the table as strings // 2. Most likely the callback will also create strings from them // ------------------------------------------------------------------------ // Let's create those string beforehand (and only once!) to benefit everyone // String n; String v = value.toString(); if (firstValueIndex) { HeaderTable.HeaderField f = table.get(intValue); n = f.name; action.onLiteralWithIndexing(intValue, n, v, valueHuffmanEncoded); } else { n = name.toString(); action.onLiteralWithIndexing(n, nameHuffmanEncoded, v, valueHuffmanEncoded); } table.put(n, v); } catch (IllegalArgumentException | IllegalStateException e) { throw new RuntimeException( new ProtocolException().initCause(e)); } finally { cleanUpAfterReading(); } }
private void resumeLiteralWithIndexing(Buffer input, DecodingCallback action) { if (!completeReading(input)) { return; } try { // // 1. (name, value) will be stored in the table as strings // 2. Most likely the callback will also create strings from them // ------------------------------------------------------------------------ // Let's create those string beforehand (and only once!) to benefit everyone // String n; String v = value.toString(); if (firstValueIndex) { HeaderTable.HeaderField f = table.get(intValue); n = f.name; action.onLiteralWithIndexing(intValue, n, v, valueHuffmanEncoded); } else { n = name.toString(); action.onLiteralWithIndexing(n, nameHuffmanEncoded, v, valueHuffmanEncoded); } table.put(n, v); } catch (IllegalArgumentException | IllegalStateException e) { throw new RuntimeException( new ProtocolException().initCause(e)); } finally { cleanUpAfterReading(); } }
private void resumeLiteralWithIndexing(Buffer input, DecodingCallback action) { if (!completeReading(input)) { return; } try { // // 1. (name, value) will be stored in the table as strings // 2. Most likely the callback will also create strings from them // ------------------------------------------------------------------------ // Let's create those string beforehand (and only once!) to benefit everyone // String n; String v = value.toString(); if (firstValueIndex) { HeaderTable.HeaderField f = table.get(intValue); n = f.name; action.onLiteralWithIndexing(intValue, n, v, valueHuffmanEncoded); } else { n = name.toString(); action.onLiteralWithIndexing(n, nameHuffmanEncoded, v, valueHuffmanEncoded); } table.put(n, v); } catch (IllegalArgumentException | IllegalStateException e) { throw new RuntimeException( new ProtocolException().initCause(e)); } finally { cleanUpAfterReading(); } }