public class FileUtils { private static final Logger logger = LoggerFactory.getLogger(FileUtils.class); /** * * @param message * @param topath * @param fileName * @throws IOException */ public static void storeMessageInDisk(String message, String topath, String fileName) throws IOException { logger.info("enter into FileUtils --> storeMessageInDisk method "); File file = new File(topath); if (!file.exists()) { file.mkdirs(); } File EDIMessage1 = new File(topath + fileName); FileWriter fwin = new FileWriter(EDIMessage1); fwin.write(message); fwin.close(); logger.info("end the FileUtils --> storeMessageInDisk method "); } }