OutputStreamWriter ow=new OutputStreamWriter(new FileOutputStream(filePateh),"GBK");
bufferedWriter bw= new bufferedWriter (ow);
if(data !=null && !"".equals(date)){
String [] str=data.split("\\|");
for (int i=0;i<str.length;i++){
bw.write(str[i]);
bw.newLine();//读取一行换行
}
}
//不能放在finally里关闭,会有影响数据不一致
bw.flush();
bw.close();
ow.close();