mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8253952: Refine ZipOutputStream.putNextEntry() to recalculate ZipEntry's compressed size
Reviewed-by: lancea, alanb
This commit is contained in:
parent
9359ff03ae
commit
60159cff40
4 changed files with 231 additions and 8 deletions
|
@ -76,8 +76,15 @@ public class JarOutputStream extends ZipOutputStream {
|
|||
/**
|
||||
* Begins writing a new JAR file entry and positions the stream
|
||||
* to the start of the entry data. This method will also close
|
||||
* any previous entry. The default compression method will be
|
||||
* used if no compression method was specified for the entry.
|
||||
* any previous entry.
|
||||
* <p>
|
||||
* The default compression method will be used if no compression
|
||||
* method was specified for the entry. When writing a compressed
|
||||
* (DEFLATED) entry, and the compressed size has not been explicitly
|
||||
* set with the {@link ZipEntry#setCompressedSize(long)} method,
|
||||
* then the compressed size will be set to the actual compressed
|
||||
* size after deflation.
|
||||
* <p>
|
||||
* The current time will be used if the entry has no set modification
|
||||
* time.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue