public class GeneratingInputStream
extends java.io.InputStream
Constructor | Description |
---|---|
GeneratingInputStream(java.util.function.BiFunction<java.lang.Long,java.lang.Integer,java.lang.Integer> function) |
This constructor instantiates the class by providing a function to generate
the bytes.
|
Modifier and Type | Method | Description |
---|---|---|
int |
read() |
public GeneratingInputStream(java.util.function.BiFunction<java.lang.Long,java.lang.Integer,java.lang.Integer> function)
function
- is a Function
to provide the bytes to be read in. The
values need to be in the range of 0 to 255. -1 signals the end of
the generated data and all following bytes need to be -1 as well.
The provided input values into the function are the number of
already generated values and the last value generated. The very
first last value is null
;Copyright © 2017–2018 PureSol Technologies. All rights reserved.