MCPcopy Create free account
hub / github.com/antlr/codebuff / drain

Method drain

output/java_guava/1.4.16/ReaderInputStream.java:248–252  ·  view source on GitHub ↗

Copy as much of the byte buffer into the output array as possible, returning the (positive) number of characters copied.

(byte[] b, int off, int len)

Source from the content-addressed store, hash-verified

246 */
247
248 private int drain(byte[] b, int off, int len) {
249 int remaining = Math.min(len, byteBuffer.remaining());
250 byteBuffer.get(b, off, remaining);
251 return remaining;
252 }
253}

Callers 1

readMethod · 0.95

Calls 3

getMethod · 0.65
minMethod · 0.45
remainingMethod · 0.45

Tested by

no test coverage detected