Last active
March 10, 2016 21:44
-
-
Save Se7soz/5d927ed6a877eb7952f8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.List; | |
public class CSVLineParser { | |
private CSVLineReader reader; | |
public CSVLineParser(CSVLineReader reader) { | |
this.reader = reader; | |
} | |
public List<String> parseCurrent() { | |
String line = readLine(); | |
List<String> ret = new ArrayList<>(); | |
if(line != null && !line.isEmpty()) { | |
ret = Arrays.asList(line.split(",")); | |
} | |
return ret; | |
} | |
private String readLine() { | |
String curLine = reader.readCurrentLine(); | |
return curLine; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment