I have a text file with multiple lines(rows) that I am trying to read using BeanIO. The file looks like this:
Adele|Lionel Richie|Hello|22865
Ed Sheeran|Simple Plan|One|11230
Here, the line represents multiple artists that have a song with the same name. Adele and Lionel Richie have a song called "Hello" and the song id is 22865. The number of columns is always 4 in each row
I need to parse this row to create 2 objects of Song
Class Song{
String artistName;
String songName;
int songId;
}
First row above must give 2 Song objects :
Adele , Hello and 22865
Lionel Richie, Hello and 22865
Would this be possible using BeanIO? I have used the delimiter parsing ability of BeanIO to parse but not sure how to get multiple records for a single line