This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
You do the same thing with String.split() that you'd do with StringTokenizer: you read in one line at a time with BufferedReader.readLine(), and then call split() on just that one line. When readLine() returns null, you're at EOF.
Joined: Sep 26, 2003
yes , readline NULL indicates that it is an end of file..but my issue is 1. each row of data as multiple colums delimited by ','..so how can i tell the program that after each ',' we will get a new row 2. how do i know that i reached an end of line...
Unless this is a learning exercise, why not use an existing library fro reading and writing CSV? CSV has a number of special cases to consider, and before you have rolled your own that handles these, you might as well use something existing.