Skip to content

Instantly share code, notes, and snippets.

@Se7soz
Last active March 10, 2016 21:44
Show Gist options
  • Save Se7soz/5d927ed6a877eb7952f8 to your computer and use it in GitHub Desktop.
Save Se7soz/5d927ed6a877eb7952f8 to your computer and use it in GitHub Desktop.
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