Skip to main content
1 of 2
java_mouse
  • 2.7k
  • 17
  • 23

CSV file generation using Java

We have a requirement in our project to generate a big CSV file every 2 hours using a Java program.

This file will have around 60,000 lines (around 120 characters per line). I am not sure about the size yet.

I would like to know if I would run into any memory issues because I will open the file using FileWriter and then keep writing and then finally close the file.

Should I worry about the size of the file? If yes, are there any other good techniques to write into a big file in Java other than using FileWriter?

java_mouse
  • 2.7k
  • 17
  • 23