try {
ByteArrayOutputStream baos = new ByteArrayOutputStream(1024);
MarshalledValueOutputStream out = new MarshalledValueOutputStream(baos);
// Write out the version for reader can know how to integrate
out.writeShort(STATE_TRANSFER_VERSION);
out.writeObject(states);
out.close();
retval = baos.toByteArray();
log.info("returning the state for tree rooted in " + fqn.toString() +
"(" + retval.length + " bytes)");