|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.stanford.nlp.io.IOUtils
public class IOUtils
Helper Class for storing serialized objects to disk.
Method Summary | |
---|---|
static Object |
readObjectFromFile(File file)
Read an object from a stored file. |
static Object |
readObjectFromFile(String filename)
Read an object from a stored file. |
static Object |
readObjectFromFileNoExceptions(File file)
Read an object from a stored file without throwing exceptions. |
static File |
writeObjectToFile(Serializable o,
String filename)
Write object to a file with the specified name. |
static File |
writeObjectToFileNoExceptions(Serializable o,
String filename)
Write object to a file with the specified name. |
static File |
writeObjectToTempFile(Serializable o,
String filename)
Write object to temp file which is destroyed when the program exits. |
static File |
writeObjectToTempFileNoExceptions(Serializable o,
String filename)
Write object to a temp file and ignore exceptions. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static File writeObjectToFile(Serializable o, String filename) throws IOException
o
- object to be written to filefilename
- name of the temp file
IOException
public static File writeObjectToFileNoExceptions(Serializable o, String filename)
o
- object to be written to filefilename
- name of the temp file
public static File writeObjectToTempFile(Serializable o, String filename) throws IOException
o
- object to be written to filefilename
- name of the temp file
IOException
public static File writeObjectToTempFileNoExceptions(Serializable o, String filename)
o
- object to be written to filefilename
- name of the temp file
public static Object readObjectFromFile(File file) throws IOException, ClassNotFoundException
file
- the file pointing to the object to be retrived
IOException
ClassNotFoundException
public static Object readObjectFromFile(String filename) throws IOException, ClassNotFoundException
filename
- The filename of the object to be retrived
IOException
ClassNotFoundException
public static Object readObjectFromFileNoExceptions(File file)
file
- the file pointing to the object to be retrived
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |