static void consume(ByteBuffer[] sourceBuffers, int toConsume) {
        for (ByteBuffer sourceBuffer : sourceBuffers) {
            int amount = min(sourceBuffer.remaining(), toConsume);
            if (amount > 0) {
                sourceBuffer.position(sourceBuffer.position() + amount);
                toConsume -= amount;
                if (toConsume == 0) {
                    break;
                }
            }
        }
        if (toConsume > 0) {
            throw new IllegalArgumentException("toConsume > data size");
        }
    }
Marks {@code toConsume} bytes of data as consumed from the buffer array.

@throws IllegalArgumentException if there are fewer than {@code toConsume} bytes remaining
common/src/main/java/org/conscrypt/BufferUtils.java