Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8326096

Deprecate getTotalIn, getTotalOut methods of java.util.zip.Inflater, java.util.zip.Deflater

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 23
    • None
    • core-libs
    • None

      The methods getTotalIn and getTotalOut return int, so they cannot represent processing of more than Integer.MAX_VALUE of compressed / uncompressed data correctly.

      Java 5 introduced the new long-returning methods getBytesRead and getBytesWritten as a replacement.

      getTotalIn and getTotalOut were never officially deprecated. Also, their current behavior (casting to int) was never specified in the API documentation.

      We should formally deprecate these methods now. It would also make sense to clearly specify their behavior for the case where their value exceeds Integer.MAX_VALUE.

            eirbjo Eirik Bjørsnøs
            eirbjo Eirik Bjørsnøs
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: