Package com.github.javacliparser
Class SerializeUtils
- java.lang.Object
-
- com.github.javacliparser.SerializeUtils
-
public class SerializeUtils extends Object
Class implementing some serialize utility methods.- Version:
- $Revision: 7 $
- Author:
- Richard Kirkby (rkirkby@cs.waikato.ac.nz)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SerializeUtils.ByteCountingOutputStream
-
Constructor Summary
Constructors Constructor Description SerializeUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Object
copyObject(Serializable obj)
static int
measureObjectByteSize(Serializable obj)
static Object
readFromFile(File file)
static void
writeToFile(File file, Serializable obj)
-
-
-
Method Detail
-
writeToFile
public static void writeToFile(File file, Serializable obj) throws IOException
- Throws:
IOException
-
readFromFile
public static Object readFromFile(File file) throws IOException, ClassNotFoundException
- Throws:
IOException
ClassNotFoundException
-
copyObject
public static Object copyObject(Serializable obj) throws Exception
- Throws:
Exception
-
measureObjectByteSize
public static int measureObjectByteSize(Serializable obj) throws Exception
- Throws:
Exception
-
-