}
this.capacityIncrement = capacityIncrement;
}
public void writeObject(Object obj) throws IOException {
ByteArrayOutputStream bout = new ByteArrayOutputStream(capacityIncrement, false);
ObjectOutputStream oout = new CompactObjectOutputStream(bout);
oout.writeObject(obj);
oout.flush();
oout.close();
ByteArray array = bout.array();
writeInt(array.length());
array.copyTo(this);
}