docs: public static void streamOut(OutputStream out, Object object, boolean compressed) throws IOException {
          if (compressed) {
              out = new GZIPOutputStream(out);
          }
          DroolsObjectOutputStream doos = null;
          try {
              doos = new DroolsObjectOutputStream(out);
              doos.writeObject(object);
          } finally {
              if( doos != null ) {
                  doos.close();
              }
              if (compressed) {
                  out.close();
              }
          }
      }