Java – use opencsv to write CSV to string without creating actual or temporary files
•
Java
I'm trying to write CSV files using the opencsv library The limitation is that I don't want to create files or even temporary files on disk Is there any way to achieve it?
In my opinion, the constructor of csvwriter needs a filewriter object
thank you!
Solution
Actually, the constructor needs a writer. You can provide a stringwriter to create a string
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码