@Override
    public long skip(long n) throws IOException {
        long toSkipRemaining = n;
        while (toSkipRemaining > Integer.MAX_VALUE) {
            int skippedBytes = inputView.skipBytes(Integer.MAX_VALUE);

            if (skippedBytes == 0) {
                return n - toSkipRemaining;
            }

            toSkipRemaining -= skippedBytes;
        }
        return n - (toSkipRemaining - inputView.skipBytes((int) toSkipRemaining));
    }
@Test
    void testSkip() throws IOException {
        final TestInputStream inputStream = new TestInputStream();
        try (TestDataInputView dataInputView = new TestDataInputView(inputStream)) {
            try (DataInputViewStream dataInputViewStream = new DataInputViewStream(dataInputView)) {
                assertThat(dataInputViewStream.skip(1)).isOne();
                assertThat(inputStream.skipped).isOne();

                final long bigNumberToSkip = 1024L + 2L * Integer.MAX_VALUE;
                assertThat(dataInputViewStream.skip(bigNumberToSkip)).isEqualTo(bigNumberToSkip);
                assertThat(inputStream.skipped).isEqualTo(1 + bigNumberToSkip);
            }
        }
    }