- 博客(6)
- 收藏
- 关注
原创 读取txt文件并入库
读取txt文件并入库(直接上代码) /** * 卡入库 * @param * @return */ public void cardExec(String fileUrl, String fileName) throws Exception { File a = new File(fileUrl); List<StandardCardVO> list = new ArrayList<>(); InputStreamRea
2021-08-24 15:12:20
505
1
原创 优化笔记:换行“\n”+循环+判断集合非空
总结: 1、换行。。。的优化方式 //写入 \n换行 List<String> objects = new ArrayList<>(); //法一: fileWriter.write(String.join("\n",objects)); //法二: for (int n = 0 ; n<objects.size() ;n++){ if (n<objects.size()-1){ fileWriter.write(
2021-07-13 11:31:08
223
原创 zip上传文件服务器
zip上传文件服务器 //往文件服务器上传 //todayDate当前为自定义,也可修改为当前日期格式 String todayDate = (new SimpleDateFormat("yyyyMMdd HHmmss")).format(calendar.getTime()); //在数据库里配置file_server_url、file_server_port等相关参数,查询系统值(系统后台参数key),返回系统后台参数集合 String url = paramService.selectGetPap
2021-06-21 18:57:25
457
原创 txt压缩zip
直接上代码 public void generateTxtToZip(String todayDate) { List<File> m = new ArrayList<>(); //todayDate当前为自定义,也可修改为当前日期格式 //String todayDate = (new SimpleDateFormat("yyyyMMdd HHmmss")).format(calendar.getTime()); m.add(new File(自
2021-06-07 16:23:28
899
原创 Java 生成txt带有第一行固定格式内容并换行
话不多说,直接上代码 public void generateTxt(String cardNo,String todayDate){ //todayDate当前为自定义,也可修改为当前日期格式 //String todayDate = (new SimpleDateFormat("yyyyMMdd HHmmss")).format(calendar.getTime()); //创建文本文件,并存在文件编码格式转换 OutputStreamWriter f
2021-06-03 09:56:20
396
原创 2021-05-22@记录第一次撰写博客
Java @记录第一次撰写博客 public static void main(String[] args) { System.out.println("hello world!"); }
2021-05-22 10:30:25
114
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人