FileOutputStream写出数据实现换行和追加写入

 FileOutputStream fos =  fos = new FileOutputStream(Utils.getData(bizCtx,"strcat(getenv(HWORKDIR),/data/baofu/,$chk_file_nm)"), true);;
                        fos.write(line1.getBytes());
                        String huanhang = System.getProperty("line.separator");
                        fos.write(huanhang.getBytes());
                        fos.flush();
                        fos.close();
原文地址:https://www.cnblogs.com/yuanchaoyong/p/8881008.html