public static void readFully(ByteBuffer from, int offset, ByteBuffer to, int size) {
        for (int i = 0; i < size; i++) {
            to.put(from.get(offset + i));
        }
    }
Slow function, should only used in test. Unless, you choose to optimize it.
This function will not move the position of <i>from</i>.
indexr-common/src/main/java/io/indexr/util/IOUtil.java