public static boolean saveStringToFile(String saveFilePathAndName,String saveString){
  if ((saveFilePathAndName == null) || saveFilePathAndName.isEmpty() || (saveString == null)|| saveString.isEmpty()) {
    return false;
  }
  BufferedWriter writer=null;
  try {
    File outputFile=new File(saveFilePathAndName);
    writer=new BufferedWriter(new FileWriter(outputFile));
    writer.write(saveString);
    return true;
  }
 catch (  Exception e) {
    logger.debug(e.toString() + System.lineSeparator() + StackTrace.getStringFromStackTrace(e));
    return false;
  }
 finally {
    try {
      if (writer != null) {
        writer.close();
      }
    }
 catch (    Exception e) {
      logger.debug(e.toString() + System.lineSeparator() + StackTrace.getStringFromStackTrace(e));
    }
  }
}

public static boolean saveStringToFile ( String saveFilePathAndName , String saveString ) { if ( ( saveFilePathAndName == null ) || saveFilePathAndName . isEmpty ( ) || ( saveString == null ) || saveString . isEmpty ( ) ) { return false ; } BufferedWriter writer = null ; try { File outputFile = new File ( saveFilePathAndName ) ; writer = new BufferedWriter ( new FileWriter ( outputFile ) ) ; writer . write ( saveString ) ; return true ; } catch ( Exception e ) { logger . debug ( e . toString ( ) + System . lineSeparator ( ) + StackTrace . getStringFromStackTrace ( e ) ) ; return false ; } finally { try { if ( writer != null ) { writer . close ( ) ; } } catch ( Exception e ) { logger . debug ( e . toString ( ) + System . lineSeparator ( ) + StackTrace . getStringFromStackTrace ( e ) ) ; } } }
this is a quiet method .
