142143144145146147148149150151152
// Serialize object final byte [] b1; { ByteArrayOutputStream bos = new ByteArrayOutputStream(); marshaller.marshall( bos, ksession, time ); b1 = bos.toByteArray(); bos.close(); }
171172173174175176177178179180181
// Reserialize and check that byte arrays are the same final byte[] b2; { ByteArrayOutputStream bos = new ByteArrayOutputStream(); marshaller.marshall( bos, ksession2, time ); b2 = bos.toByteArray(); bos.close(); }