Closeable, AutoCloseablepublic class GeneratingInputStream extends InputStream
| Constructor | Description |
|---|---|
GeneratingInputStream(BiFunction<Long,Integer,Integer> function) |
This constructor instantiates the class by providing a function to generate
the bytes.
|
| Modifier and Type | Method | Description |
|---|---|---|
int |
read() |
available, close, mark, markSupported, read, read, readAllBytes, readNBytes, reset, skip, transferTopublic GeneratingInputStream(BiFunction<Long,Integer,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;public int read()
read in class InputStreamCopyright © 2017–2018 PureSol Technologies. All rights reserved.