question: public static byte [ ] readBytesFromByteBuffer ( ByteBuffer byteBuffer ) { byte [ ] buffer = new byte [ byteBuffer . remaining ( ) ] ; byteBuffer . get ( buffer ) ; return buffer ; }
target:  Reads the remaining bytes in a ByteBuffer into a byte[].