public static void saveBinary(File saveTo,Object model,Instances header) throws IOException {
  ObjectOutputStream os=new ObjectOutputStream(new BufferedOutputStream(new FileOutputStream(saveTo)));
  os.writeObject(model);
  if (header != null) {
    os.writeObject(header);
  }
  os.close();
}

public static void saveBinary ( File saveTo , Object model , Instances header ) throws IOException { ObjectOutputStream os = new ObjectOutputStream ( new BufferedOutputStream ( new FileOutputStream ( saveTo ) ) ) ; os . writeObject ( model ) ; if ( header != null ) { os . writeObject ( header ) ; } os . close ( ) ; }
save a model in binary form .
