MCPcopy Create free account
hub / github.com/apache/tomcat / writeValueString

Method writeValueString

java/org/apache/coyote/http2/HpackEncoder.java:259–265  ·  view source on GitHub ↗
(ByteBuffer target, String val)

Source from the content-addressed store, hash-verified

257 }
258
259 private void writeValueString(ByteBuffer target, String val) {
260 target.put((byte) 0); // to use encodeInteger we need to place the first byte in the buffer.
261 Hpack.encodeInteger(target, val.length(), 7);
262 for (int j = 0; j < val.length(); ++j) {
263 target.put((byte) val.charAt(j));
264 }
265 }
266
267 private void addToDynamicTable(String headerName, String val) {
268 int pos = entryPositionCounter++;

Callers 1

Calls 4

encodeIntegerMethod · 0.95
lengthMethod · 0.80
charAtMethod · 0.80
putMethod · 0.65

Tested by

no test coverage detected