hg: jdk7/tl/jdk: 3 new changesets
Xueming.Shen at Sun.COM
Sat Nov 28 05:24:02 UTC 2009
Bob Lee wrote:
> On Wed, Oct 21, 2009 at 1:02 PM, <xueming.shen at sun.com
> <mailto:xueming.shen at sun.com>> wrote:
> 4206909: want java.util.zip to work for interactive use (Z_SYNC_FLUSH)
> Summary: Add sync_flush option into Deflater/DefalterOutputStream
> Reviewed-by: martin, alanb
> ! src/share/classes/java/util/zip/Deflater.java
> ! src/share/classes/java/util/zip/DeflaterOutputStream.java
> ! src/share/native/java/util/zip/Deflater.c
> + test/java/util/zip/InflateIn_DeflateOut.java
> Should we use an enum for the flush strategies? It would help separate
> them from the compression strategies, and it would make the new method
> easier to use because it would be obvious at compile time which values
> you can pass in (as opposed to allowing any random int).
There was discussion on whether or not the enum should be used instead
of the raw integter tyep. Using an enum has
clear advantage as you pointed but would be inconsistent with existing
parameters (the strategy for example) . We settled
with the raw integer to prefer the local consistency.
> Also, we could add a note about how alternate flush strategies can
> negatively affect compatibility with tools like WinZip.
What exactly is this incompatibility you refer here?
More information about the core-libs-dev