appl.util
Class GeneralUtil
java.lang.Object
appl.util.GeneralUtil
public class GeneralUtil
- extends Object
General utility class. See method description for details.
- Author:
- Dominik Appl
Field Summary |
static Logger |
LOG
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOG
public static Logger LOG
GeneralUtil
public GeneralUtil()
loadClassFromURL
public static Object loadClassFromURL(URL location,
String classname)
- Loads a class from the specified URL and returns an instance of this class.
- Parameters:
location
- the URL of the rootDirectory/networkLocationclassname
- the fully qualified name of the class (the class must have a
- Returns:
- the instance of the class or
null
if loading fails
SerializeToFile
public static void SerializeToFile(Object o,
File destFile)
- Serializes the given object into the specified file. All exceptions are printed to console.
- Parameters:
o
- the objectdestFile
- the file to write to
readSerializedFrom
public static Object readSerializedFrom(File loadFile)
- Reads the first object out of the file
- Parameters:
loadFile
- the file to read from
- Returns:
- the object