public class ReactiveTestUtils extends Object
| Modifier and Type | Class and Description | 
|---|---|
| static class  | ReactiveTestUtils.StreamDescription | 
| Constructor and Description | 
|---|
| ReactiveTestUtils() | 
| Modifier and Type | Method and Description | 
|---|---|
| static io.reactivex.Single<ReactiveTestUtils.StreamDescription> | consumeStream(org.reactivestreams.Publisher<ByteBuffer> publisher)Consumes the given stream and returns a data structure containing its length and digest. | 
| static String | getStreamHash(long length)Computes the hash of the deterministic stream (as produced by  produceStream(long)). | 
| static io.reactivex.Flowable<ByteBuffer> | produceStream(long length)Produces a deterministic stream of bytes, in randomly sized chunks of up to 128kB. | 
| static io.reactivex.Flowable<ByteBuffer> | produceStream(long length,
             AtomicReference<String> hash)Produces a deterministic stream of bytes, in randomly sized chunks of up to 128kB, while computing the hash of
 the random data. | 
| static io.reactivex.Flowable<ByteBuffer> | produceStream(long length,
             int maximumBlockSize,
             AtomicReference<String> hash)Produces a deterministic stream of bytes, in randomly sized chunks, while computing the hash of the random data. | 
public static io.reactivex.Flowable<ByteBuffer> produceStream(long length)
length - the number of bytes in the streampublic static io.reactivex.Flowable<ByteBuffer> produceStream(long length, AtomicReference<String> hash)
length - the number of bytes in the streamhash - an output argument for the hash, set when the end of the stream is reached; if null, the
             hash will not be computedpublic static io.reactivex.Flowable<ByteBuffer> produceStream(long length, int maximumBlockSize, AtomicReference<String> hash)
length - the number of bytes in the streammaximumBlockSize - the maximum size of any ByteBuffer in the streamhash - an output argument for the hash, set when the end of the stream is reached; if null, the
             hash will not be computedpublic static String getStreamHash(long length)
produceStream(long)).public static io.reactivex.Single<ReactiveTestUtils.StreamDescription> consumeStream(org.reactivestreams.Publisher<ByteBuffer> publisher)
Copyright © 2005–2022 The Apache Software Foundation. All rights reserved.