Le 08/08/2013 14:25, Benedikt Ritter a écrit :

> Anyway we would still have the problems I outline:
> - the same CSVParser can be created in different ways (via contructor and
> via CSVFormat.parse(Reader)).

And from CSVFormat.parse()

> - parse methods don't actually parse. They just create parser objects,
> which may be confusing.

'parse' isn't a bad name, considering the idiom using a foreach loop:

for (CSVRecord record : CSVParser.parse(input)) {
    ....
}

But that doesn't play well with the parse methods using a File or an
URL, because the underlying reader can't be closed. So I'd rather keep
the resource management out of CSVParser.

Emmanuel Bourg


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to