<snip> >> A use case I have now is a CSV file with a lot of columns (~90) but I only >> care about a small subset of the columns (~10). I'd like to be able to say >> withHeader(Set) where the Set may be a subset of the actual column names in >> the header line. This is different from withHeader(String[]) because the >> names in the Set must match the names in the header record.
> > > > What you are talking about sounds more like a view or a projection of the > > actual content being parsed. > > Do we really need this for 1.0 or can it be postponed? > > This is a real scenario and a real need, not some imaginary complication ;) > > Even if it is not implemented for 1.0, we should talk about how it > should be done such that it fits in and does not cause API problems > later. And if I can get it done by then, then that much the better. > Okay, then let's discuss this on a new thread :-) As I've said, I think we should not push to much into withHeaders(String...). Maybe this is some sort of view, where you can pass a parser and the headers you are interested in and it will return an Iterable<CSVRecord> (or CSVParser) that just gives access to the specified headers you are interessted in? Would it be possible to give a code example of what you have to do with to current API in your use case and what you want? Benedikt -- http://people.apache.org/~britter/ http://www.systemoutprintln.de/ http://twitter.com/BenediktRitter http://github.com/britter