|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.vrspace.util.Util
Miscelanous usefull methods
Constructor Summary | |
Util()
|
Method Summary | |
static java.lang.String |
checkPath(java.lang.String path)
Changes ":" to "\" in path, then all instances of "\" to "/". |
static java.io.FileOutputStream |
createFileOutputStream(java.lang.String destPath)
Creates FileOutputStream in destPath, with directiories as needed |
static java.lang.String |
getClassName(java.lang.Class cls)
|
static java.lang.String |
getClassName(java.lang.Object obj)
|
static java.lang.String |
getDir(java.lang.String path)
Returns directory part of a file name |
static java.net.URL |
getLocation(java.lang.Object obj)
Returns the location of the class file |
static java.lang.String |
getPackageName(java.lang.Class cls)
Returns package name for a class |
static java.lang.String |
getPackageName(java.lang.Object obj)
|
static boolean |
hasVrmlExtension(java.lang.String path)
true if the file has the extension .wrl (not e.g. |
static java.util.Properties |
loadProperties(java.util.Properties props,
java.lang.String file)
Loads properties from file into props |
static java.lang.Object |
pop()
pop from static Stack |
static void |
push(java.lang.Object obj)
push obj to static Stack |
static void |
setDefaultProperty(java.util.Properties props,
java.lang.String name,
java.lang.String defaultValue)
Sets the property name to defaultValue if not null, or to the system property if exists, only if it does not already exist in props |
static void |
sleep(long millis)
I hate catching InterruptedException! |
static void |
storeProperties(java.util.Properties props,
java.lang.String file)
Stores the properties from props to file |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Util()
Method Detail |
public static void push(java.lang.Object obj)
public static java.lang.Object pop()
public static java.net.URL getLocation(java.lang.Object obj)
public static java.lang.String getDir(java.lang.String path)
public static java.util.Properties loadProperties(java.util.Properties props, java.lang.String file) throws java.io.FileNotFoundException, java.io.IOException
java.io.FileNotFoundException
java.io.IOException
public static void storeProperties(java.util.Properties props, java.lang.String file) throws java.io.FileNotFoundException, java.io.IOException
java.io.FileNotFoundException
java.io.IOException
public static void setDefaultProperty(java.util.Properties props, java.lang.String name, java.lang.String defaultValue)
public static java.io.FileOutputStream createFileOutputStream(java.lang.String destPath) throws java.io.IOException
java.io.IOException
public static void sleep(long millis)
public static java.lang.String checkPath(java.lang.String path)
public static boolean hasVrmlExtension(java.lang.String path)
public static java.lang.String getPackageName(java.lang.Class cls)
public static java.lang.String getPackageName(java.lang.Object obj)
public static java.lang.String getClassName(java.lang.Class cls)
public static java.lang.String getClassName(java.lang.Object obj)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |