javadoc would be nice. is this copying the ```ByteBuffer``` to the byte array? what happen if the byte array is smaller?