org.jscience.util
Class MiscellaneousUtils

java.lang.Object
  extended by org.jscience.util.MiscellaneousUtils

public final class MiscellaneousUtils
extends java.lang.Object

just some miscellaneous stuff for convenience that doesn't fit anywhere else


Method Summary
static java.lang.String asPercent(double d)
           
static java.security.KeyPair generateKeyPair()
           
static java.security.KeyPair generateKeyPair(int keySize)
           
static java.security.KeyPair generateKeyPair(java.lang.String algorithm, int keySize)
           
static void pause(long millisec)
          just simplifies a call to Thread.sleep()
static boolean start(java.net.URL url)
          This method attempts to start the given url with the associated default application (most likely a web-browser) by calling start urlPath.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

start

public static boolean start(java.net.URL url)
This method attempts to start the given url with the associated default application (most likely a web-browser) by calling start urlPath. If this doesn't work, nothing happens; errors are ignored. The method uses the parameter application.startCommand from the Properties obtained from Settings.getProperties() to start the url. Note that a successful call to this method is platform dependent; you may have to adjust the application.startCommand parameter to make this work for your platform. The default value for this parameter shipped with the antelmann.jar file works for Windows NT/2000.

Returns:
true if no exceptions were thrown, false otherwise
See Also:
Settings.getProperties()

pause

public static void pause(long millisec)
just simplifies a call to Thread.sleep()


asPercent

public static java.lang.String asPercent(double d)

generateKeyPair

public static java.security.KeyPair generateKeyPair()

generateKeyPair

public static java.security.KeyPair generateKeyPair(int keySize)

generateKeyPair

public static java.security.KeyPair generateKeyPair(java.lang.String algorithm,
                                                    int keySize)
                                             throws java.security.NoSuchAlgorithmException
Throws:
java.security.NoSuchAlgorithmException