private void rewriteSaveFile(Iterable<TrackPoint> data){
  FileOutputStream fileOutput=null;
  DataOutputStream out=null;
  try {
    fileOutput=ctx.openFileOutput(SAVEFILE,Context.MODE_PRIVATE);
    out=new DataOutputStream(new BufferedOutputStream(fileOutput));
    out.writeInt(TrackPoint.FORMAT_VERSION);
    for (    TrackPoint point : data) {
      point.toStream(out);
    }
  }
 catch (  Exception e) {
    markSavingBroken("Failed to rewrite broken save file",e);
  }
 finally {
    SavingHelper.close(out);
  }
}

private void rewriteSaveFile ( Iterable < TrackPoint > data ) { FileOutputStream fileOutput = null ; DataOutputStream out = null ; try { fileOutput = ctx . openFileOutput ( SAVEFILE , Context . MODE_PRIVATE ) ; out = new DataOutputStream ( new BufferedOutputStream ( fileOutput ) ) ; out . writeInt ( TrackPoint . FORMAT_VERSION ) ; for ( TrackPoint point : data ) { point . toStream ( out ) ; } } catch ( Exception e ) { markSavingBroken ( "Failed to rewrite broken save file" , e ) ; } finally { SavingHelper . close ( out ) ; } }
saves the given data to disk , overwriting anything already saved
