Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8282648 Weaken the InflaterInputStream specification in order to allow faster Zip implementations
  3. JDK-8304489

Release Note: Weaken the InflaterInputStream Specification in Order to Allow Faster Zip Implementations

    XMLWordPrintable

Details

    • Sub-task
    • Resolution: Delivered
    • P4
    • 20
    • 20
    • core-libs

    Description

      The specification of the `read` methods defined by `java.util.zip.InflaterInputStream`,`ZipInputStream`, and `GZIPInputStream` have changed to allow these methods deviate from `InputStream.read` for the case that a “short read” occurs.

      A “short read” is the case where the user provides a buffer with space for M bytes but only N bytes (where 0 < N < M) are read. The long standing specification for `InputStream.read` is that N bytes are stored in the buffer provided by the user and elements at offset off+N to off+M-1 are not changed.

      The deviation allows the `read` method to use the elements at off+N to off+M-1 as temporary storage. Code using these APIs can no longer depend on these elements being unaffected when reading uncompressed data into a byte array.

      Attachments

        Activity

          People

            simonis Volker Simonis
            simonis Volker Simonis
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: