8282648: Weaken the InflaterInputStream specification in order to allow faster Zip implementations

Reviewed-by: lancea, alanb, jpai, mr, darcy
This commit is contained in:
Volker Simonis 2022-09-05 12:50:52 +00:00
parent e31c537f05
commit 2c61efe3de
7 changed files with 82 additions and 19 deletions

View file

@ -343,6 +343,12 @@ public class ZipFile implements ZipConstants, Closeable {
* Closing this ZIP file will, in turn, close all input streams that
* have been returned by invocations of this method.
*
* @apiNote The {@code InputStream} returned by this method can wrap an
* {@link java.util.zip.InflaterInputStream InflaterInputStream}, whose
* {@link java.util.zip.InflaterInputStream#read(byte[], int, int)
* read(byte[], int, int)} method can modify any element of the output
* buffer.
*
* @param entry the zip file entry
* @return the input stream for reading the contents of the specified
* zip file entry or null if the zip file entry does not exist