question: public static int putByteBuffer ( byte [ ] bytes , int offset , ByteBuffer buf ) { int len = buf . remaining ( ) ; buf . get ( bytes , offset , len ) ; return offset + len ; }
target:  Add the whole content of the ByteBuffer to the bytes arrays. The ByteBuffer is modified.