@Test
    public void testSkipExcluded() throws IOException {
        byte[] bytes = new byte[100];
        InputStream is = new LengthCheckInputStream(
                new ByteArrayInputStream(bytes), 90, EXCLUDE_SKIPPED_BYTES);
        assertTrue(10 == is.skip(10));
        StreamUtils.consumeInputStream(is);
        is.close();
    }
Actual number of bytes consumed is exactly what's expected, when skipped
bytes are excluded.
aws-java-sdk-core/src/test/java/com/amazonaws/util/LengthCheckInputStreamTest.java