droolsStream = (DroolsObjectOutputStream) out;
} else {
bytes = new ByteArrayOutputStream();
droolsStream = new DroolsObjectOutputStream( bytes );
}
droolsStream.writeObject( rules );
droolsStream.writeObject( namedWindows );
droolsStream.writeObject( idGenerator );
droolsStream.writeBoolean( ordered );
if ( !isDrools ) {
droolsStream.flush();