|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Random
java.security.SecureRandom
net.i2p.util.RandomSource
net.i2p.util.BufferedRandomSource
public class BufferedRandomSource
Allocate data out of a large buffer of data, rather than the PRNG's (likely) small buffer to reduce the frequency of prng recalcs (though the recalcs are now more time consuming).
Field Summary |
---|
Fields inherited from class net.i2p.util.RandomSource |
---|
_context |
Constructor Summary | |
---|---|
BufferedRandomSource(I2PAppContext context)
Deprecated. |
|
BufferedRandomSource(I2PAppContext context,
int bufferSize)
Deprecated. |
Method Summary | |
---|---|
(package private) static int |
countBits(long val)
Deprecated. |
boolean |
nextBoolean()
Deprecated. override as synchronized, for those JVMs that don't always pull via nextBytes (cough ibm) |
void |
nextBytes(byte[] buf)
Deprecated. |
double |
nextDouble()
Deprecated. defined per javadoc ( ((nextBits(26)<<27) + nextBits(27)) / (1 << 53)) |
float |
nextFloat()
Deprecated. defined per javadoc (nextBits(24) / ((float)(1 << 24)) ) |
double |
nextGaussian()
Deprecated. |
int |
nextInt()
Deprecated. |
int |
nextInt(int n)
Deprecated. According to the java docs (http://java.sun.com/j2se/1.4.1/docs/api/java/util/Random.html#nextInt(int)) nextInt(n) should return a number between 0 and n (including 0 and excluding n). |
long |
nextLong()
Deprecated. |
long |
nextLong(long n)
Deprecated. Like the modified nextInt, nextLong(n) returns a random number from 0 through n, including 0, excluding n. |
Methods inherited from class net.i2p.util.RandomSource |
---|
feedEntropy, feedEntropy, getInstance, harvester, initSeed, loadSeed, main, saveSeed, writeSeed |
Methods inherited from class java.security.SecureRandom |
---|
generateSeed, getAlgorithm, getInstance, getInstance, getInstance, getProvider, getSeed, next, setSeed, setSeed |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BufferedRandomSource(I2PAppContext context)
public BufferedRandomSource(I2PAppContext context, int bufferSize)
Method Detail |
---|
public final void nextBytes(byte[] buf)
nextBytes
in class SecureRandom
public final int nextInt(int n)
RandomSource
nextInt
in class RandomSource
public final int nextInt()
nextInt
in class Random
public final long nextLong(long n)
nextLong
in class RandomSource
public final long nextLong()
nextLong
in class Random
static final int countBits(long val)
public final boolean nextBoolean()
nextBoolean
in class Random
public final double nextDouble()
nextDouble
in class Random
public float nextFloat()
nextFloat
in class Random
public double nextGaussian()
nextGaussian
in class Random
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |