private void recordLogData(){
  try {
    int size=mRecordingData.size();
    if (size == 0) {
      return;
    }
    Vector<String> recordingData=new Vector<>(mRecordingData);
    File logDir=Constants.getRecordDir(this);
    logDir.mkdirs();
    File logFile=new File(logDir,mRecordingFilename);
    FileWriter logFileWriter=new FileWriter(logFile,true);
    for (int i=0; i < size; i++) {
      logFileWriter.append(recordingData.elementAt(i) + "\n");
      mRecordingData.removeElementAt(0);
    }
    recordingData.removeAllElements();
    logFileWriter.close();
  }
 catch (  Exception e) {
    Log.e(LOG_TAG,"recordLogData:Error writing the log to file. Exception: " + e.toString());
  }
}

private void recordLogData ( ) { try { int size = mRecordingData . size ( ) ; if ( size == 0 ) { return ; } Vector < String > recordingData = new Vector < > ( mRecordingData ) ; File logDir = Constants . getRecordDir ( this ) ; logDir . mkdirs ( ) ; File logFile = new File ( logDir , mRecordingFilename ) ; FileWriter logFileWriter = new FileWriter ( logFile , true ) ; for ( int i = 0 ; i < size ; i ++ ) { logFileWriter . append ( recordingData . elementAt ( i ) + "\n" ) ; mRecordingData . removeElementAt ( 0 ) ; } recordingData . removeAllElements ( ) ; logFileWriter . close ( ) ; } catch ( Exception e ) { Log . e ( LOG_TAG , "recordLogData:Error writing the log to file. Exception: " + e . toString ( ) ) ; } }
save log data to file
