|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object extended byptolemy.copernicus.c.FileHandler
A class that takes care of common File I/O functions.
| Constructor Summary | |
FileHandler()
|
|
| Method Summary | |
static boolean |
exists(java.lang.String fileName)
Tells whether a file or directory with a given name exists. |
static java.lang.Object |
readObject(java.lang.String fileName)
Reads an object from a specified file. |
static java.lang.String |
readStringFromFile(java.lang.String fileName)
Reads the contents of a text file and returns them as a String. |
static void |
write(java.lang.String fileName,
java.lang.Object object)
Write out the given Object to a file. |
static void |
write(java.lang.String fileName,
java.lang.String code)
Write out the given string to a file. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public FileHandler()
| Method Detail |
public static boolean exists(java.lang.String fileName)
fileName - A fileName.
public static java.lang.Object readObject(java.lang.String fileName)
fileName - The file to read.
public static java.lang.String readStringFromFile(java.lang.String fileName)
fileName - The file to read from.
public static void write(java.lang.String fileName, java.lang.String code)
fileName - The file to write to.code - The String to write.
java.lang.RuntimeException - If it fails to write.public static void write(java.lang.String fileName, java.lang.Object object)
fileName - The file to write to.object - The object to write.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||