Rather than reinventing the wheel you could have a look at OpenCSV which supports reading and writing of CSV files. Here are examples of reading & writing
More Related Contents:
- BufferedWriter not writing everything to its output file
- Read CSV file column by column
- Writing object in text file
- How to move elements of Java ArrayList to file in java [closed]
- How to append text to an existing file in Java?
- Scanner vs. BufferedReader
- How to read a specific line using the specific line number from a file in Java?
- CSV API for Java [closed]
- Reliable File.renameTo() alternative on Windows?
- File Upload with Java (with progress bar)
- Converting JSON to XLS/CSV in Java [closed]
- How to add a new line of text to an existing file in Java? [duplicate]
- Java IOException “Too many open files”
- Getting the inputstream from a classpath resource (XML file)
- CSV parsing in Java – working example..? [closed]
- Elegant way to read file into byte[] array in Java [duplicate]
- Java FileInputStream ObjectInputStream reaches end of file EOF
- Parsing CSV input with a RegEx in java
- Forward slash or backslash?
- Writing to console and text file
- setting a UTF-8 in java and csv file [duplicate]
- Java scanner not going through entire file
- Why is using BufferedInputStream to read a file byte by byte faster than using FileInputStream?
- OpenCSV – How to map selected columns to Java Bean regardless of order?
- Java read file and store text in an array
- Whole text file to a String in Java
- How to get the number of columns from a JDBC ResultSet?
- Java OutOfMemoryError in reading a large text file
- Java- Intersection point of a Polygon and Line
- Difference between Files#delete(Path) and File#delete()