private void writeLocalCSV(MedtronicSensorRecord mostRecentData,Context context){
  try {
    if (mostRecentData == null || mostRecentData.bGValue == null)     log.debug("writeLocalCSV SAVING  EMPTY!!");
 else     log.debug("writeLocalCSV SAVING --> " + mostRecentData.bGValue);
    ObjectOutputStream oos=new ObjectOutputStream(new FileOutputStream(new File(context.getFilesDir(),"save.bin")));
    oos.writeObject(mostRecentData);
    oos.flush();
    oos.close();
  }
 catch (  Exception e) {
    Log.e(TAG,"write to OutputStream failed",e);
    log.error("write to OutputStream failed",e);
  }
}

private void writeLocalCSV ( MedtronicSensorRecord mostRecentData , Context context ) { try { if ( mostRecentData == null || mostRecentData . bGValue == null ) log . debug ( "writeLocalCSV SAVING  EMPTY!!" ) ; else log . debug ( "writeLocalCSV SAVING --> " + mostRecentData . bGValue ) ; ObjectOutputStream oos = new ObjectOutputStream ( new FileOutputStream ( new File ( context . getFilesDir ( ) , "save.bin" ) ) ) ; oos . writeObject ( mostRecentData ) ; oos . flush ( ) ; oos . close ( ) ; } catch ( Exception e ) { Log . e ( TAG , "write to OutputStream failed" , e ) ; log . error ( "write to OutputStream failed" , e ) ; } }
this method saves a file with the last record read from the device
