You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Stefan Bodewig <bo...@apache.org> on 2018/05/01 10:24:01 UTC

Re: [compress][io] Avoid InputStream#skip?

Hi all

as skip throwing exception is uncommon enough that it hasn't been
reported before in Compress and only seems to happen if you use streams
like System.in maybe we can solve the issue by providing a wrapper
stream that overrides skip so that it uses read and advice people to use
that if they use special streams?

For Compress I really don't want to stop using skip as we potentially
use it to skip larger chunks of uncompressed archives when moving ahead
to the next entry without wanting to read the current one and reading
will mean a significant slowdown for everybody in order to avoid
problems in a few corner cases.

Stefan

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


Re: [compress][io] Avoid InputStream#skip?

Posted by Matt Sicker <bo...@gmail.com>.
Speaking of rarely used APIs in java.io, would that also include
mark/available/reset? Or are those all implemented in terms of skip()?

On 1 May 2018 at 06:05, Torsten Curdt <tc...@vafer.org> wrote:

> +1
>
> On Tue, May 1, 2018 at 12:59 PM, sebb <se...@gmail.com> wrote:
>
> > On 1 May 2018 at 11:24, Stefan Bodewig <bo...@apache.org> wrote:
> > > Hi all
> > >
> > > as skip throwing exception is uncommon enough that it hasn't been
> > > reported before in Compress and only seems to happen if you use streams
> > > like System.in maybe we can solve the issue by providing a wrapper
> > > stream that overrides skip so that it uses read and advice people to
> use
> > > that if they use special streams?
> >
> > +1
> >
> > > For Compress I really don't want to stop using skip as we potentially
> > > use it to skip larger chunks of uncompressed archives when moving ahead
> > > to the next entry without wanting to read the current one and reading
> > > will mean a significant slowdown for everybody in order to avoid
> > > problems in a few corner cases.
> > >
> > > Stefan
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > > For additional commands, e-mail: dev-help@commons.apache.org
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > For additional commands, e-mail: dev-help@commons.apache.org
> >
> >
>



-- 
Matt Sicker <bo...@gmail.com>

Re: [compress][io] Avoid InputStream#skip?

Posted by Torsten Curdt <tc...@vafer.org>.
+1

On Tue, May 1, 2018 at 12:59 PM, sebb <se...@gmail.com> wrote:

> On 1 May 2018 at 11:24, Stefan Bodewig <bo...@apache.org> wrote:
> > Hi all
> >
> > as skip throwing exception is uncommon enough that it hasn't been
> > reported before in Compress and only seems to happen if you use streams
> > like System.in maybe we can solve the issue by providing a wrapper
> > stream that overrides skip so that it uses read and advice people to use
> > that if they use special streams?
>
> +1
>
> > For Compress I really don't want to stop using skip as we potentially
> > use it to skip larger chunks of uncompressed archives when moving ahead
> > to the next entry without wanting to read the current one and reading
> > will mean a significant slowdown for everybody in order to avoid
> > problems in a few corner cases.
> >
> > Stefan
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > For additional commands, e-mail: dev-help@commons.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

Re: [compress][io] Avoid InputStream#skip?

Posted by sebb <se...@gmail.com>.
On 1 May 2018 at 11:24, Stefan Bodewig <bo...@apache.org> wrote:
> Hi all
>
> as skip throwing exception is uncommon enough that it hasn't been
> reported before in Compress and only seems to happen if you use streams
> like System.in maybe we can solve the issue by providing a wrapper
> stream that overrides skip so that it uses read and advice people to use
> that if they use special streams?

+1

> For Compress I really don't want to stop using skip as we potentially
> use it to skip larger chunks of uncompressed archives when moving ahead
> to the next entry without wanting to read the current one and reading
> will mean a significant slowdown for everybody in order to avoid
> problems in a few corner cases.
>
> Stefan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>

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