code: public static void writeModel(@NonNull Model model, @NonNull File file, boolean saveUpdater,DataNormalization dataNormalization) throws IOException {
          try (BufferedOutputStream stream = new BufferedOutputStream(new FileOutputStream(file))) {
              writeModel(model, stream, saveUpdater,dataNormalization);
          }
      }
docs: Write a model to a file
  @param model the model to write
  @param file the file to write to
  @param saveUpdater whether to save the updater or not
  @param dataNormalization the normalizer to save (optional)
  @throws IOException