Imported GNU Classpath 0.92
2006-08-14 Mark Wielaard <mark@klomp.org> Imported GNU Classpath 0.92 * HACKING: Add more importing hints. Update automake version requirement. * configure.ac (gconf-peer): New enable AC argument. Add --disable-gconf-peer and --enable-default-preferences-peer to classpath configure when gconf is disabled. * scripts/makemake.tcl: Set gnu/java/util/prefs/gconf and gnu/java/awt/dnd/peer/gtk to bc. Classify gnu/java/security/Configuration.java as generated source file. * gnu/java/lang/management/VMGarbageCollectorMXBeanImpl.java, gnu/java/lang/management/VMMemoryPoolMXBeanImpl.java, gnu/java/lang/management/VMClassLoadingMXBeanImpl.java, gnu/java/lang/management/VMRuntimeMXBeanImpl.java, gnu/java/lang/management/VMMemoryManagerMXBeanImpl.java, gnu/java/lang/management/VMThreadMXBeanImpl.java, gnu/java/lang/management/VMMemoryMXBeanImpl.java, gnu/java/lang/management/VMCompilationMXBeanImpl.java: New VM stub classes. * java/lang/management/VMManagementFactory.java: Likewise. * java/net/VMURLConnection.java: Likewise. * gnu/java/nio/VMChannel.java: Likewise. * java/lang/Thread.java (getState): Add stub implementation. * java/lang/Class.java (isEnum): Likewise. * java/lang/Class.h (isEnum): Likewise. * gnu/awt/xlib/XToolkit.java (getClasspathTextLayoutPeer): Removed. * javax/naming/spi/NamingManager.java: New override for StackWalker functionality. * configure, sources.am, Makefile.in, gcj/Makefile.in, include/Makefile.in, testsuite/Makefile.in: Regenerated. From-SVN: r116139
This commit is contained in:
parent
abab460491
commit
ac1ed908de
1294 changed files with 99479 additions and 35933 deletions
|
@ -41,14 +41,11 @@ package gnu.java.security.prng;
|
|||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>An abstract class to facilitate implementing PRNG algorithms.</p>
|
||||
* An abstract class to facilitate implementing PRNG algorithms.
|
||||
*/
|
||||
public abstract class BasePRNG implements IRandom
|
||||
public abstract class BasePRNG
|
||||
implements IRandom
|
||||
{
|
||||
|
||||
// Constants and variables
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
/** The canonical name prefix of the PRNG algorithm. */
|
||||
protected String name;
|
||||
|
||||
|
@ -61,12 +58,9 @@ public abstract class BasePRNG implements IRandom
|
|||
/** The index into buffer of where the next byte will come from. */
|
||||
protected int ndx;
|
||||
|
||||
// Constructor(s)
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* <p>Trivial constructor for use by concrete subclasses.</p>
|
||||
*
|
||||
* Trivial constructor for use by concrete subclasses.
|
||||
*
|
||||
* @param name the canonical name of this instance.
|
||||
*/
|
||||
protected BasePRNG(String name)
|
||||
|
@ -78,14 +72,6 @@ public abstract class BasePRNG implements IRandom
|
|||
buffer = new byte[0];
|
||||
}
|
||||
|
||||
// Class methods
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
// Instance methods
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
// IRandom interface implementation ----------------------------------------
|
||||
|
||||
public String name()
|
||||
{
|
||||
return name;
|
||||
|
@ -101,10 +87,9 @@ public abstract class BasePRNG implements IRandom
|
|||
|
||||
public byte nextByte() throws IllegalStateException, LimitReachedException
|
||||
{
|
||||
if (!initialised)
|
||||
{
|
||||
throw new IllegalStateException();
|
||||
}
|
||||
if (! initialised)
|
||||
throw new IllegalStateException();
|
||||
|
||||
return nextByteInternal();
|
||||
}
|
||||
|
||||
|
@ -117,7 +102,7 @@ public abstract class BasePRNG implements IRandom
|
|||
public void nextBytes(byte[] out, int offset, int length)
|
||||
throws IllegalStateException, LimitReachedException
|
||||
{
|
||||
if (!initialised)
|
||||
if (! initialised)
|
||||
throw new IllegalStateException("not initialized");
|
||||
|
||||
if (length == 0)
|
||||
|
@ -127,7 +112,6 @@ public abstract class BasePRNG implements IRandom
|
|||
throw new ArrayIndexOutOfBoundsException("offset=" + offset + " length="
|
||||
+ length + " limit="
|
||||
+ out.length);
|
||||
|
||||
if (ndx >= buffer.length)
|
||||
{
|
||||
fillBlock();
|
||||
|
@ -163,9 +147,6 @@ public abstract class BasePRNG implements IRandom
|
|||
throw new UnsupportedOperationException("random state is non-modifiable");
|
||||
}
|
||||
|
||||
// Instance methods
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
public boolean isInitialised()
|
||||
{
|
||||
return initialised;
|
||||
|
@ -182,8 +163,6 @@ public abstract class BasePRNG implements IRandom
|
|||
return buffer[ndx++];
|
||||
}
|
||||
|
||||
// abstract methods to implement by subclasses -----------------------------
|
||||
|
||||
public Object clone() throws CloneNotSupportedException
|
||||
{
|
||||
BasePRNG result = (BasePRNG) super.clone();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue