Modifier and Type | Class and Description |
---|---|
static class |
Reactive3TestUtils.StreamDescription |
Constructor and Description |
---|
Reactive3TestUtils() |
Modifier and Type | Method and Description |
---|---|
static io.reactivex.rxjava3.core.Single<Reactive3TestUtils.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.rxjava3.core.Flowable<ByteBuffer> |
produceStream(long length)
Produces a deterministic stream of bytes, in randomly sized chunks of up to 128kB.
|
static io.reactivex.rxjava3.core.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.rxjava3.core.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.rxjava3.core.Flowable<ByteBuffer> produceStream(long length)
length
- the number of bytes in the streampublic static io.reactivex.rxjava3.core.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.rxjava3.core.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 stream
hash
- 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.rxjava3.core.Single<Reactive3TestUtils.StreamDescription> consumeStream(org.reactivestreams.Publisher<ByteBuffer> publisher)
Copyright © 2005–2021 The Apache Software Foundation. All rights reserved.