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)
| 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 | } |