### Question:
AwsChunkedEncodingInputStream extends SdkInputStream { @Override public long skip(long n) throws IOException { if (n <= 0) { return 0; } long remaining = n; final int toskip = (int) Math.min(DEFAULT_BUFFER_SIZE, n); final byte[] temp = new byte[toskip]; while (remaining > 0) { final int count = read(temp, 0, toskip); if (count < 0) { break; } remaining -= count; } return n - remaining; } AwsChunkedEncodingInputStream(InputStream in, byte[] kSigning,
            String datetime, String keyPath, String headerSignature,
            AWS4Signer aws4Signer);  AwsChunkedEncodingInputStream(InputStream in, int maxBufferSize,
            byte[] kSigning, String datetime, String keyPath,
            String headerSignature, AWS4Signer aws4Signer); @Override int read(); @Override int read(byte[] b, int off, int len); @Override long skip(long n); @Override boolean markSupported(); @Override synchronized void mark(int readlimit); @Override synchronized void reset(); static long calculateStreamContentLength(long originalLength);  }### Answer:
@Test public void testSkip() throws IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); aceis.skip(100); byte[] buf = new byte[2048]; int read = -1; while ((read = aceis.read(buf)) != -1) { baos.write(buf, 0, read); } aceis.close(); baos.flush(); File written = new File(getClass().getResource("/com/amazonaws/auth/SignedTestData.txt") .getPath()); ByteArrayOutputStream expected = new ByteArrayOutputStream(); FileInputStream writtenFis = new FileInputStream(written); writtenFis.skip(100); int transferred = -1; byte[] transferBuf = new byte[2048]; while ((transferred = writtenFis.read(transferBuf)) != -1) { expected.write(transferBuf, 0, transferred); } expected.flush(); writtenFis.close(); assertArrayEquals(expected.toByteArray(), baos.toByteArray()); }