os.close();
if( i == 0 )
len = os.toByteArray().length;
ByteArrayInputStream is = new ByteArrayInputStream(os.toByteArray());
CompactedObjectInputStream in = new CompactedObjectInputStream(is);
assertEquals(in.readObject().getClass(), Bean.class);
}
System.out.println("compacted java write and parse 500 times in " + (System.currentTimeMillis()-now)+"ms, size " + len);
}
public static enum EnumTest { READ, WRITE, CREATE, UNREGISTER };