Class SerialIO

java.lang.Object
cnuphys.swim.util.SerialIO

public class SerialIO extends Object
  • Constructor Details

    • SerialIO

      public SerialIO()
  • Method Details

    • serialRead

      public static Object serialRead(String fullfn)
      Reads a serializable object from a file.
      Parameters:
      fullfn - the full path.
      Returns:
      the deserialized object.
    • serialRead

      public static Object serialRead(byte[] bytes)
      serialRead reads a serializable object from a byte array
      Parameters:
      bytes - the byte array
      Returns:
      the deserialized object
    • serialWrite

      public static void serialWrite(Serializable obj, String fullfn)
      serialWrite writes out a serializable object to a file.
      Parameters:
      obj - the serializable object.
      fullfn - the full path.
    • serialWrite

      public static byte[] serialWrite(Serializable obj)
      serialWrite writes out a serializable object to a byte array.
      Parameters:
      obj - the serializable object.
      Returns:
      the array of bytes.