public static void createTxt(String showMess,Integer line) {
try {
String filePath = "D:/showled"; //导出目录
File shipmentFile = new File(filePath);
if(!shipmentFile.exists()){
shipmentFile.mkdirs();
}
shipmentFile = new File(filePath + File.separator +"bz"+"-"+line+".txt");
OutputStreamWriter writer = new OutputStreamWriter(new FileOutputStream(shipmentFile), "GBK");
writer.write(showMess.toString().trim().toCharArray());
writer.flush();
writer.close();
} catch (Exception e) {
throw new BusinessException(e.getMessage());
}
}