@Test public void multiRequests() { initChunkedStream(smallBuff, of(8, 2, 0), of(8, 2, 0)); byte[] first = new byte[8]; arraycopy(smallBuff, 0, first, 0, 8); byte[] second = new byte[2]; arraycopy(smallBuff, 8, second, 0, 2); toSource(pub).subscribe(sub1); sub1.request(1); assertThat(sub1.takeItems(), contains(first)); sub1.request(1); assertThat(sub1.takeItems(), contains(second)); sub1.request(1); assertThat(sub1.takeTerminal(), is(complete())); }
@Override public void subscribe(final Subscriber<? super byte[]> subscriber) { subscribeInternal(subscriber); }
FromInputStreamPublisher extends Publisher<byte[]> implements PublisherSource<byte[]> { @Override public void subscribe(final Subscriber<? super byte[]> subscriber) { subscribeInternal(subscriber); } }
FromInputStreamPublisher extends Publisher<byte[]> implements PublisherSource<byte[]> { @Override public void subscribe(final Subscriber<? super byte[]> subscriber) { subscribeInternal(subscriber); } FromInputStreamPublisher(final InputStream stream); }
FromInputStreamPublisher extends Publisher<byte[]> implements PublisherSource<byte[]> { @Override public void subscribe(final Subscriber<? super byte[]> subscriber) { subscribeInternal(subscriber); } FromInputStreamPublisher(final InputStream stream); @Override void subscribe(final Subscriber<? super byte[]> subscriber); }
FromInputStreamPublisher extends Publisher<byte[]> implements PublisherSource<byte[]> { @Override public void subscribe(final Subscriber<? super byte[]> subscriber) { subscribeInternal(subscriber); } FromInputStreamPublisher(final InputStream stream); @Override void subscribe(final Subscriber<? super byte[]> subscriber);  }