On 6 March 2018 at 21:38, Gary Gregory <garydgreg...@gmail.com> wrote:
> Hi All:
>
> Any objection to adding:
>
> /**
>  * Reads n lines from this reader.
>  */
> List<String>
> org.apache.commons.io.input.ReversedLinesFileReader.readLine(long lineCount)
>
> ?

Yes.

The name makes it sound like it is reading a single line, yet the
output is a list of lines.

Also, this seems like the sort of function that could be dealt with
via a more general approach which would work with any method.
AFAICT there would be no gain in embedding the looping code in IO
rather than having it somewhere else.

What happens if there aren't enough lines in the file?
What happens if there is an IO error reading one of the lines?

> Gary

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

Reply via email to