0

I might be making this more complicated than it is but I have some code that gives me a CSV as a string. I want to turn that into a pojo for some test code I am writing. I am using SuperCSV

beanReader = new CsvBeanReader(new FileReader(csvFileName),CsvPreference.STANDARD_PREFERENCE);

Seems that the only option is to pass in a file. I would like to pass in my String. Trying to avoid getting the CSV as a string, writing it to disk, reading it back in and making a pojo

ducati1212
  • 201
  • 2
  • 13

1 Answers1

0

I believe you can use new StringReader("a,b,c\n1,2,3\n4,5,6"), give that a try.

Jeronimo Backes
  • 6,141
  • 2
  • 25
  • 29