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