commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject [Compress] Do output streams really need the putNextEntry() method?
Date Mon, 30 Mar 2009 14:05:02 GMT
The abstract parent class for archive output streams has the method

putArchiveEntry(ArchiveEntry)

but all the implementations - apart from Ar - also define the specific method

putNextEntry(xxxArchiveEntry) where xxx = Zip, Jar, etc.

Do we really need the latter method?
Would it not just be simpler to keep the generic method and throw an
Exception (e.g. ClassCast or IllegalParameter) if the wrong type of
ArchiveEntry was provided?

If the method is needed, then it ought to be documented in the abstract class.

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


Mime
View raw message