public class RandomInputStream
extends java.io.InputStream
java.util.Random or one of its
subclasses java.security.SecureRandom,
iaik.security.random.SecRandom, etc.| Constructor and Description |
|---|
RandomInputStream(java.util.Random random)
Create a new RandomInputStream that reads from the specified random number
generator.
|
| Modifier and Type | Method and Description |
|---|---|
int |
available()
Return the number of bytes available for a non-blocking read from this
stream.
|
int |
read()
Read one byte and return it.
|
int |
read(byte[] b)
Read b.length bytes.
|
int |
read(byte[] b,
int off,
int len)
Read len bytes into b.
|
public RandomInputStream(java.util.Random random)
public int read(byte[] b)
read in class java.io.InputStreampublic int read(byte[] b,
int off,
int len)
read in class java.io.InputStreampublic int read()
read in class java.io.InputStreampublic int available()
Integer.MAX_VALUE (231 - 1). This method never
throws an IOException.available in class java.io.InputStream