public byte[] serialize( Object object ) throws IOException
{
ReplicaEventMessage replicaEventMessage = ( ReplicaEventMessage ) object;
Entry entry = replicaEventMessage.getEntry();
ChangeType changeType = replicaEventMessage.getChangeType();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
ObjectOutput out = new ObjectOutputStream( baos );
// The change type first
out.writeByte( changeType.getValue() );
// The entry DN
entry.getDn().writeExternal( out );
// The entry