Class SerialIO
java.lang.Object
cnuphys.swim.util.SerialIO
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ObjectserialRead(byte[] bytes) serialRead reads a serializable object from a byte arraystatic ObjectserialRead(String fullfn) Reads a serializable object from a file.static byte[]serialWrite(Serializable obj) serialWrite writes out a serializable object to a byte array.static voidserialWrite(Serializable obj, String fullfn) serialWrite writes out a serializable object to a file.
-
Constructor Details
-
SerialIO
public SerialIO()
-
-
Method Details
-
serialRead
-
serialRead
serialRead reads a serializable object from a byte array- Parameters:
bytes- the byte array- Returns:
- the deserialized object
-
serialWrite
serialWrite writes out a serializable object to a file.- Parameters:
obj- the serializable object.fullfn- the full path.
-
serialWrite
serialWrite writes out a serializable object to a byte array.- Parameters:
obj- the serializable object.- Returns:
- the array of bytes.
-