|
Holger's Java API |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.antelmann.util.Misc
public final class Misc
just some miscellaneous stuff for convenience that doesn't fit anywhere else
| Field Summary | |
|---|---|
static UniversalComparator |
comparator
a universally useful instance of a Comparator |
| Method Summary | ||
|---|---|---|
static Properties |
asProperties(ResourceBundle bundle)
|
|
static KeyPair |
generateKeyPair()
|
|
static KeyPair |
generateKeyPair(int keySize)
|
|
static KeyPair |
generateKeyPair(String algorithm,
int keySize)
|
|
static URLClassLoader |
loadClasses(File... dirOrJar)
preloads all classes found in the given directories and/or Jar files |
|
static URLClassLoader |
loadClasses(Monitor monitor,
File... dirOrJar)
preloads all classes found in the given directories and/or Jar files |
|
static URLClassLoader |
loadFromClassPath(Monitor mon,
String path)
preloads all classes found in the given path |
|
static URLClassLoader |
loadFromClassPath(String path)
preloads all classes found in the given path |
|
static String |
makeURLString(File file)
generates a URL-like String of the form " |
|
static void |
pause(long millisec)
just simplifies a call to Thread.sleep() |
|
static
|
reverseComparator(Comparator<T> comp)
returns an inversed filter to the given one |
|
static
|
reverseFilter(Filter<T> filter)
returns an inversed filter to the given one |
|
static boolean |
same(Object s1,
Object s2)
returns true only if the the both objects are equal or both null, false otherwise |
|
static Process |
start(String... params)
starts a given file and other parameters with the platform specific application.startCommand in the settings. |
|
static boolean |
start(URL url)
This method attempts to start the given url with the associated default application (most likely a web-browser) by calling |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final UniversalComparator comparator
| Method Detail |
|---|
public static URLClassLoader loadFromClassPath(String path)
throws IOException
IOException
public static URLClassLoader loadFromClassPath(Monitor mon,
String path)
throws IOException
mon - allows to individually monitor the loading processpath - the path to load the classes from
IOException
public static URLClassLoader loadClasses(File... dirOrJar)
throws IOException
dirOrJar - Jar files or directories that are to be loaded
IOException
public static URLClassLoader loadClasses(Monitor monitor,
File... dirOrJar)
throws IOException
monitor - allows to individually monitor the loading processdirOrJar - Jar files or directories that are to be loaded
IOException
public static String makeURLString(File file)
throws IOException
IOExceptionpublic static <T> Filter<T> reverseFilter(Filter<T> filter)
public static <T> Comparator<T> reverseComparator(Comparator<T> comp)
public static boolean start(URL url)
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 different command parts of the application.startCommand
are separated by a tab (\t).
The default value for this parameter shipped with the antelmann.jar file
works for Windows NT/2000/XP.
Settings.getProperties()
public static Process start(String... params)
throws IOException
IOExceptionSettings.getProperties()public static void pause(long millisec)
Thread.sleep()
public static Properties asProperties(ResourceBundle bundle)
public static KeyPair generateKeyPair()
public static KeyPair generateKeyPair(int keySize)
public static KeyPair generateKeyPair(String algorithm,
int keySize)
throws NoSuchAlgorithmException
NoSuchAlgorithmException
public static boolean same(Object s1,
Object s2)
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||