|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.knowceans.util.ObjectIo
public class ObjectIo
ObjectIo provides a simplified interface for object io to zip files. Open streams using open*Stream(filename), then write to / read from the returned Object*Stream and close the stream using close*Stream() or Object*Stream.close(). The close*Stream() methods are provided for symmetry with the open*Stream() methods, in order to improve code readability.
Constructor Summary | |
---|---|
ObjectIo()
|
Method Summary | |
---|---|
static void |
closeInputStream(java.io.ObjectInputStream dis)
Close the input stream |
static void |
closeOutputStream(java.io.ObjectOutputStream dos)
Close the data output, which results in flushing the write buffer and closing the file. |
static java.io.ObjectInputStream |
openInputStream(java.lang.String filename)
Opens a data input stream with optional zip compression. |
static java.io.ObjectOutputStream |
openOutputStream(java.lang.String filename)
Opens an object output stream with optional zip compression. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ObjectIo()
Method Detail |
---|
public static java.io.ObjectOutputStream openOutputStream(java.lang.String filename) throws java.io.FileNotFoundException, java.io.IOException
filename
-
java.io.IOException
java.io.FileNotFoundException
public static void closeOutputStream(java.io.ObjectOutputStream dos) throws java.io.IOException
dos
-
java.io.IOException
public static java.io.ObjectInputStream openInputStream(java.lang.String filename) throws java.io.IOException
filename
-
java.io.IOException
public static void closeInputStream(java.io.ObjectInputStream dis) throws java.io.IOException
dis
-
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |