JDK-4818580 : ZipFileInputStream.available() always returns the full entry size
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util
  • Affected Version: 1.4.2
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_2.6
  • CPU: generic
  • Submitted: 2003-02-14
  • Updated: 2003-02-14
  • Resolved: 2003-02-14
Related Reports
Duplicate :  
Relates :  
Description
ZipFileInputStream's available() method incorrectly returns the full entry size in its available() method, rather than the remaining number of bytes that can be read.

src/share/classes/java/util/zip/ZipFile.java:

	public int available() {
	    return size;
	}

should be:

	public int available() {
	    return rem;
	}

This is causing bug 4818574 to happen. Please see  4818574 for more details.