Use OpenCSV to convert CSV file in XML File using byte[] in input



I have a question:


I'm trying to convert my CSV file to XML file and I'm seeing the response of this post: Java lib or app to convert CSV to XML file?


I see that I need use this OpenCSV library and in particular, I must use this code:



CSVReader reader = new CSVReader(new FileReader(startFile));


where String startFile = "./startData.csv";


Now, I don't get a String as startFile, but I have a byte[] because, for other question, I have convert my file in byte[]. How can I use this code with byte[]?


Are there alternatives?


Thanks


No comments:

Post a Comment