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

Method expand

java/org/apache/catalina/tribes/io/XByteBuffer.java:322–327  ·  view source on GitHub ↗

Expands the internal buffer to accommodate the specified number of bytes. @param newcount the new minimum capacity required

(int newcount)

Source from the content-addressed store, hash-verified

320 * @param newcount the new minimum capacity required
321 */
322 public void expand(int newcount) {
323 // don't change the allocation strategy
324 byte[] newbuf = new byte[Math.max(buf.length << 1, newcount)];
325 System.arraycopy(buf, 0, newbuf, 0, bufSize);
326 buf = newbuf;
327 }
328
329 /**
330 * Returns the current capacity of the internal buffer.

Callers 2

appendMethod · 0.95
getBufferMethod · 0.95

Calls 1

maxMethod · 0.45

Tested by

no test coverage detected