@Test @UseDataProvider("provideRead") public void read(final byte[] readBuffer) { assertThat(this.in.read(readBuffer), is(readBuffer.length)); for (int i = 0; i < readBuffer.length; i++) { assertThat(readBuffer[i], is(this.buf[i % this.buf.length])); assertThat(this.in.available(), is(Integer.MAX_VALUE)); } }
@Override public int read() { return this.buf[updateCursor(1)]; }
InfiniteInputStream extends InputStream { @Override public int read() { return this.buf[updateCursor(1)]; } }
InfiniteInputStream extends InputStream { @Override public int read() { return this.buf[updateCursor(1)]; } InfiniteInputStream(final byte[] buf); }
InfiniteInputStream extends InputStream { @Override public int read() { return this.buf[updateCursor(1)]; } InfiniteInputStream(final byte[] buf); @Override int read(); @Override int read(final byte[] b); @Override int read(final byte[] b, final int off, final int len); @Override int available(); @Override void mark(final int readlimit); @Override void reset(); @Override boolean markSupported(); @Override String toString(); }
InfiniteInputStream extends InputStream { @Override public int read() { return this.buf[updateCursor(1)]; } InfiniteInputStream(final byte[] buf); @Override int read(); @Override int read(final byte[] b); @Override int read(final byte[] b, final int off, final int len); @Override int available(); @Override void mark(final int readlimit); @Override void reset(); @Override boolean markSupported(); @Override String toString();  }