Add data to the buffer. @param src Bytes array @param off Offset @param len Length @throws IOException Writing overflow data to the output channel failed
(byte[] src, int off, int len)
| 720 | * @throws IOException Writing overflow data to the output channel failed |
| 721 | */ |
| 722 | public void append(byte[] src, int off, int len) throws IOException { |
| 723 | if (bb.remaining() == 0) { |
| 724 | appendByteArray(src, off, len); |
| 725 | } else { |
| 726 | int n = transfer(src, off, len, bb); |
| 727 | len = len - n; |
| 728 | off = off + n; |
| 729 | if (len > 0 && isFull(bb)) { |
| 730 | flushByteBuffer(); |
| 731 | appendByteArray(src, off, len); |
| 732 | } |
| 733 | } |
| 734 | } |
| 735 | |
| 736 | /** |
| 737 | * Add data to the buffer. |
no test coverage detected