|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttools.UniversalTool
public class UniversalTool
Class for various purposes
Constructor Summary | |
---|---|
UniversalTool()
|
Method Summary | |
---|---|
static boolean |
compareIntArrs(int[] intArr1,
int[] intArr2)
Compares two int[]. |
static java.lang.String |
getCurrentTimeString()
Returns the current date and time as string. |
static java.lang.String |
getExceptionString(java.lang.Exception e)
Formats the given exception and returns its string representation. |
static java.lang.String |
getExceptionString(java.lang.Exception e,
boolean getStackTrace)
Formats the given exception and returns its string representation. |
static boolean |
loadObjectsFromFile(java.lang.String filePath,
java.util.Vector<java.lang.Object> objectsToLoad)
Load the given objects from an existing file previously saved using the saveObjectsToFile method. |
static boolean |
saveObjectsToFile(java.lang.String filePath,
java.util.Vector<java.lang.Object> objectsToSave)
Save objects into file for later use. |
static boolean |
writeRandomFile(java.lang.String filePath,
int size)
Writes a random int sequence of the required size to the file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UniversalTool()
Method Detail |
---|
public static java.lang.String getCurrentTimeString()
public static java.lang.String getExceptionString(java.lang.Exception e)
e
-
public static java.lang.String getExceptionString(java.lang.Exception e, boolean getStackTrace)
e
- getStackTrace
-
public static boolean compareIntArrs(int[] intArr1, int[] intArr2)
intArr1
- intArr2
-
public static boolean writeRandomFile(java.lang.String filePath, int size)
filePath
- size
-
public static boolean saveObjectsToFile(java.lang.String filePath, java.util.Vector<java.lang.Object> objectsToSave) throws java.lang.Exception
filePath
- - full path of the file to which the objects are savedobjectsToSave
- - a Vector
containing the objects to save
java.lang.Exception
public static boolean loadObjectsFromFile(java.lang.String filePath, java.util.Vector<java.lang.Object> objectsToLoad)
saveObjectsToFile
method.
filePath
- - the path to the file to load the objects fromobjectsToLoad
- - the Vector
must be initialized with the correct dimensions and the correct type of the objects in the file.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |