public static void main(String[] args) throws IOException, ClassNotFoundException {
        SerialCtl sc = new SerialCtl("Test1", "Test2");
        System.out.println("Before write \n" + sc);

        ByteArrayOutputStream buf = new ByteArrayOutputStream();
        ObjectOutput out = new ObjectOutputStream(buf);
        out.writeObject(sc);

        ObjectInput in = new ObjectInputStream(new ByteArrayInputStream(buf.toByteArray()));
        SerialCtl sc2 = (SerialCtl)in.readObject();
        System.out.println("After restore: \n" + sc2);
    }