MCPcopy
hub / github.com/google/guava / drain

Method drain

guava/src/com/google/common/io/ReaderInputStream.java:255–259  ·  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

253 * number of characters copied.
254 */
255 private int drain(byte[] b, int off, int len) {
256 int remaining = min(len, byteBuffer.remaining());
257 byteBuffer.get(b, off, remaining);
258 return remaining;
259 }
260}

Callers 1

readMethod · 0.95

Calls 3

getMethod · 0.65
minMethod · 0.45
remainingMethod · 0.45

Tested by

no test coverage detected