public final class RandomInputStream extends InputStream
InputStream that reads data from a (pseudo) random number generator.
This stream has no end of file. Closing a RandomInputStream has no
effect. Never throws IOExceptions. Thread safe.| Constructor and Description |
|---|
RandomInputStream()
Creates a new
RandomInputStream. |
RandomInputStream(Random prng)
Creates a new
RandomInputStream. |
| Modifier and Type | Method and Description |
|---|---|
int |
read() |
int |
read(byte[] b) |
int |
read(byte[] b,
int off,
int len) |
available, close, mark, markSupported, reset, skippublic RandomInputStream()
RandomInputStream.public RandomInputStream(Random prng)
RandomInputStream.prng - the source of randomness to use.NullPointerException - if prng is null.public int read()
read in class InputStreampublic int read(byte[] b)
read in class InputStreampublic int read(byte[] b,
int off,
int len)
read in class InputStreamCopyright © 2012–2015. All rights reserved.