commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: [COMPRESS] Archive Stream refactoring
Date Mon, 30 Mar 2009 04:16:41 GMT
On 2009-03-29, sebb <sebbaz@gmail.com> wrote:

> The existing ArchiveInputStream and ArchiveOutputStream abstract
> classes are quite minimal. Seems to me that there is quite a lot of
> common code that they could provide.

> For example, if the Stream was stored as a protected variable, then
> they could provide generic implementations for many of the stream
> methods, e.g. read() and read(byte[]) and close().

If the current implementations are similar enough that one can really
extract methods in a useful way, go for it.

> We could also add some new methods with partial implementations, for example

> putArchiveEntry(File)

> extractFile(File basedir, Entry)

If this is a common usecase, yes.  The only real user of a simial API
I know is Ant and here those methods wouldn't help since they don't
provide a way to specify permissions and so on.

> and possibly getNextFile()

what would that do?  Call getNextEntry until one is not a directory?

Stefan

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


Mime
View raw message