commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: [COMPRESS] Archive Stream refactoring
Date Mon, 30 Mar 2009 04:16:41 GMT
On 2009-03-29, sebb <> 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?


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

View raw message