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 2009/02/07 15:14:20 UTC
[compress] Let Archive*Stream and Compressor*Stream extend Filter*Stream
Hi,
I change ArchiveOutputStream extend FilterOutputStream while I
modified ZipArchiveOutputStream and it seems a very natural thing to
do for all the other streams as well.
All concrete compressor/archiver streams have constructors that take a
different stream as their argument and most of them store it somewhere
internally so Filter*Stream seems a natural choice.
Stefan
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [compress] Let Archive*Stream and Compressor*Stream extend Filter*Stream
Posted by Stefan Bodewig <bo...@apache.org>.
On 2009-02-10, Stefan Bodewig <bo...@apache.org> wrote:
> On 2009-02-10, Torsten Curdt <tc...@apache.org> wrote:
>> No particular objections. Not sure it helps much though :)
> True.
Actually it hurts.
Via FilterOutputStream a call to ArchiveOutputStream.flush() would
suddenly flush the wrapped stream where it had been a no-op for most
ArchiveOutputStream subclasses before.
I've reverted my changes and implemented the part of
FilterOutputStream required by ZipArchiveOutputStream - write(byte[])
- in that class.
Stefan
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [compress] Let Archive*Stream and Compressor*Stream extend Filter*Stream
Posted by Stefan Bodewig <bo...@apache.org>.
On 2009-02-10, Torsten Curdt <tc...@apache.org> wrote:
> No particular objections. Not sure it helps much though :)
True.
I'll probably try to find out why ZipArchiveOutputStream extended
FilterOutputStream in the first place - probably because
java.util.zip.ZipOutputStream does and Ant's class should be as close
to a drop-in replacement as it gets.
For the *InputStreams we would be able to remove some explicit
implementations of the read method(s) in some classes, so it does make
sense there.
Stefan
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [compress] Let Archive*Stream and Compressor*Stream extend
Filter*Stream
Posted by Torsten Curdt <tc...@apache.org>.
No particular objections. Not sure it helps much though :)
cheers
--
Torsten
On Sat, Feb 7, 2009 at 15:14, Stefan Bodewig <bo...@apache.org> wrote:
> Hi,
>
> I change ArchiveOutputStream extend FilterOutputStream while I
> modified ZipArchiveOutputStream and it seems a very natural thing to
> do for all the other streams as well.
>
> All concrete compressor/archiver streams have constructors that take a
> different stream as their argument and most of them store it somewhere
> internally so Filter*Stream seems a natural choice.
>
> 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