org.mmbase.util
Class RandomInputStream
java.lang.Object
java.io.InputStream
org.mmbase.util.MockInputStream
org.mmbase.util.RandomInputStream
- All Implemented Interfaces:
- Closeable
public class RandomInputStream
- extends MockInputStream
An input stream only producing random bytes. Not costing any memory though.
- Since:
- MMBase-1.9.2
- Version:
- $Id: RandomInputStream.java 41055 2010-02-15 23:59:16Z michiel $
- Author:
- Michiel Meeuwissen
|
Method Summary |
protected void |
fillArray(byte[] data,
int offset,
int l)
|
protected int |
oneByte()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RandomInputStream
public RandomInputStream(int l)
- This input stream produces a given number of random number.
- Parameters:
l - How long this input stream will be
RandomInputStream
public RandomInputStream()
- Produces an immense amount of randomness
oneByte
protected int oneByte()
- Specified by:
oneByte in class MockInputStream
fillArray
protected void fillArray(byte[] data,
int offset,
int l)
- Specified by:
fillArray in class MockInputStream
MMBase 2.0-SNAPSHOT - null