Am 12. März 2012 18:38 schrieb Emmanuel Bourg <ebo...@apache.org>: > Le 12/03/2012 18:31, Benedikt Ritter a écrit : > > >> I'm not sure if I got you right. You have to pass a CSVFormat if you >> want to construct a CSVLexer(), so we could use the lexer's internal >> CSVformat. > > > Yes that's what I understood, when I mention the parser it includes the > lexer as well. >
you wrote about the printer ;) now I know what you mean. > I think the parser should look for any line separator and not only the one > defined in the format. Otherwise the user will have to know in advance the > line separator of the input files, and that's not always possible. > Okay, then I guess the best would be to have some place where all possible line separators are defined. That could be a custom enum, that has a string value. then we could do something like: private isEndOfLine(int c){ for(LineSeparator separator : LineSeparator.values()) { // do what is necessary to decide if we have a line separator and return true } return false; } Since the issue is tagged 1.x, I guess it is not our priority, although I see the potential for a performance improvements. > Emmanuel Bourg > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org