|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.io.InputStream | +--iaik.security.random.RandomInputStream
An InputStream that reads data from a Random number generator.
The Random number generator can be java.util.Random
or one of its subclasses java.security.SecureRandom
,
iaik.security.random.SecRandom
, etc.
SecRandom
Constructor Summary | |
RandomInputStream(Random random)
Create a new RandomInputStream that reads from the specified random number generator. |
Method Summary | |
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. |
Methods inherited from class java.io.InputStream |
close, mark, markSupported, reset, skip |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RandomInputStream(Random random)
Method Detail |
public int read(byte[] b)
read
in class InputStream
public int read(byte[] b, int off, int len)
read
in class InputStream
public int read()
read
in class InputStream
public int available()
Integer.MAX_VALUE
(231 - 1).
This method never throws an IOException.available
in class InputStream
|
This Javadoc may contain text parts from Internet Standard specifications (RFC 2459, 3280, 3039, 2560, 1521, 821, 822, 2253, 1319, 1321, ,2630, 2631, 2268, 3058, 2984, 2104, 2144, 2040, 2311, 2279, see copyright note) and RSA Data Security Public-Key Cryptography Standards (PKCS#1,3,5,7,8,9,10,12, see copyright note). | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |