byte[] b2 = out2.toByteArray();
out.writeInt(b2.length);
out.write(b2);
FastByteArrayInputStream bis3 = new FastByteArrayInputStream(b2);
ObjectInputStream ois3 = new ObjectInputStream(bis3);
Assert.assertEquals(student2, ois3.readObject());
Assert.assertEquals(student3, ois3.readObject());
out.close();
final byte[] b = f.toByteArray();
FastByteArrayInputStream in = new FastByteArrayInputStream(b);
ObjectInputStream oin = new ObjectInputStream(in);
Assert.assertEquals(student1, oin.readObject());
Assert.assertEquals(5, oin.readInt());
int size3 = oin.readInt();
byte[] b3 = new byte[size3];
oin.read(b3);
ArrayAssert.assertEquals(b2, b3);
FastByteArrayInputStream bis4 = new FastByteArrayInputStream(b3);
ObjectInputStream ois4 = new ObjectInputStream(bis4);
Assert.assertEquals(student2, ois4.readObject());
Assert.assertEquals(student3, ois4.readObject());
oin.close();