Package cnuphys.swim.util
Class SerialIO
java.lang.Object
cnuphys.swim.util.SerialIO
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Object
serialRead
(byte[] bytes) serialRead reads a serializable object from a byte arraystatic Object
serialRead
(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 void
serialWrite
(Serializable obj, String fullfn) serialWrite writes out a serializable object to a file.
-
Constructor Details
-
SerialIO
public SerialIO()
-
-
Method Details
-
serialRead
Reads a serializable object from a file.- Parameters:
fullfn
- the full path.- Returns:
- the deserialized object.
-
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.
-