import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.FileWriter;
import java.io.BufferedWriter;
public class FileLineRead {
/**
* @ClassName FileLineRead
* @author javen
* @date May 29, 2015 10:48:35 AM
*/
public static void main(String args[]) throws IOException{
FileReader fr = new FileReader("F:/exercise/readlineReader.txt");
BufferedReader br = new BufferedReader(fr);
FileWriter fw = new FileWriter("F:/exercise/readlineWriter.txt");
BufferedWriter bw = new BufferedWriter(fw);
String line= "";
String [] arrs = null;
while((line = br.readLine() )!= null ){
arrs = line.split(",");
for(int i=0;i<arrs.length;i++){
System.out.println(arrs+":"+arrs[i]);
bw.write(arrs[i] +"/n");
}
}
System.out.println("ok*************************");
bw.close();
br.close();
fw.close();
fr.close();
}
}