@Test public void skip() throws Exception { when(istream.skip(200L)).thenReturn(199L); ByteCountingInputStream s = new ByteCountingInputStream(istream); assertEquals(199L, s.skip(200L)); assertEquals(199, s.getBytesRead()); verify(istream, times(1)).skip(200L); verifyNoMoreInteractions(istream); }
@Override public long skip(long n) throws IOException { long c = in_.skip(n); len_ += c; return c; }
ByteCountingInputStream extends InputStream { @Override public long skip(long n) throws IOException { long c = in_.skip(n); len_ += c; return c; } }
ByteCountingInputStream extends InputStream { @Override public long skip(long n) throws IOException { long c = in_.skip(n); len_ += c; return c; } ByteCountingInputStream(InputStream in, boolean propagate_close);  ByteCountingInputStream(InputStream in); }
ByteCountingInputStream extends InputStream { @Override public long skip(long n) throws IOException { long c = in_.skip(n); len_ += c; return c; } ByteCountingInputStream(InputStream in, boolean propagate_close);  ByteCountingInputStream(InputStream in); long getBytesRead(); @Override int read(); @Override int read(byte b[]); @Override int read(byte b[], int off, int len); @Override long skip(long n); @Override int available(); @Override void close(); @Override synchronized void mark(int readlimit); @Override synchronized void reset(); @Override boolean markSupported(); }
ByteCountingInputStream extends InputStream { @Override public long skip(long n) throws IOException { long c = in_.skip(n); len_ += c; return c; } ByteCountingInputStream(InputStream in, boolean propagate_close);  ByteCountingInputStream(InputStream in); long getBytesRead(); @Override int read(); @Override int read(byte b[]); @Override int read(byte b[], int off, int len); @Override long skip(long n); @Override int available(); @Override void close(); @Override synchronized void mark(int readlimit); @Override synchronized void reset(); @Override boolean markSupported();  }