I need to parse 2 dimensional list, here is my schema list :
list (size=12)
->[0] = "export.SampleJ:12432"
--> id = 12432
--> dateCreatedSample = "Tue Feb 03 19:04:23 CST 2009"
--> ttId = 0
--> chipId = 1012
--> ...
->[1] = "export.SampleJ:12433"
--> id = 12433
--> ...
->[2] ...
I tried :
List<String[]> allElements = list.readAll();
StringWriter sw = new StringWriter();
CSVWriter writer = new CSVWriter(sw);
writer.writeAll(allElements);
but I have this error : No signature of method: java.util.ArrayList.readAll() is applicable for argument types: () values: []
Also tried :
CSVWriter writer = new CSVWriter(new FileWriter("MyFile.csv"));
String[] entries = list;
writer.writeNext(entries);
writer.close();
I get a csv file, but with only : "export.SampleJ:12432", "export.SampleJ:12432", ...
How can I parse id, dateCreatedSample, etc ?
Is there a way to connect my list directly with opencsv ?