commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "C. Grobmeier" <grobme...@possessed.de>
Subject Re: [compress] Discussing compress
Date Tue, 14 Feb 2006 12:34:03 GMT
> I was thinking that something like
> Compress.getInstance(String compressorType);
> like Crypto would be nice.
> This way you can get a unique "entry point" for every compression algorithm 
> that can provide its own methods to compress/decompress/add files etc etc.

you are speaking of a factory method.
I allready thought about it. Besides:

Compress.getInstance(String compressorType);

there could be also a

Compress.getInstance(File compressedFile);

which loads a compressed file with the correct Compressor.
Returntype of getInstance could be Compressor, which is the interface of 
an concrete algorithm implementation.

Thx,
- Chris


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


Mime
View raw message