MCPcopy Index your code
hub / github.com/apache/tomcat / doGetBytes

Method doGetBytes

java/org/apache/coyote/ajp/AjpMessage.java:299–316  ·  view source on GitHub ↗
(MessageBytes mb, boolean terminated)

Source from the content-addressed store, hash-verified

297 }
298
299 private void doGetBytes(MessageBytes mb, boolean terminated) {
300 int length = getInt();
301 if (length == 0xFFFF || length == -1) {
302 mb.recycle();
303 return;
304 }
305 if (terminated) {
306 validatePos(pos + length + 1);
307 } else {
308 validatePos(pos + length);
309 }
310 mb.setBytes(buf, pos, length);
311 mb.getCharChunk().recycle(); // not valid anymore
312 pos += length;
313 if (terminated) {
314 pos++; // Skip the terminating \0
315 }
316 }
317
318
319 /**

Callers 2

getBytesMethod · 0.95
getBodyBytesMethod · 0.95

Calls 5

getIntMethod · 0.95
validatePosMethod · 0.95
getCharChunkMethod · 0.80
recycleMethod · 0.65
setBytesMethod · 0.45

Tested by

no test coverage detected