commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: [compress][io] Avoid InputStream#skip?
Date Mon, 23 Apr 2018 18:45:36 GMT
On 2018-04-22, Gary Gregory wrote:

> We should at the very least document all of this carefully.

commons-io's IOUtils already quite clearly states it is using read and
not using skip at all.

> My gut reaction is that an API called skip should call skip internally.
> Doing anything else clever as you point out has performance implications
> and might violate the principle of least surprise.

Unfortunately I don't see any clean way to use skip at all.

> We could consider creating a Skipper interface that can be implemented by
> with Skip and a SkipRead implementations. Then all of the code that used to
> call skip would be parameterized. But this might be too framework-y for
> [io], or [compress]

Just grep for IOUtils.skip through the compress code base, it is used
all over the place. :-)


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message