diff --git a/classpath/java/util/zip/ZipFile.java b/classpath/java/util/zip/ZipFile.java index 8a675ef8f..b6cc43d1d 100644 --- a/classpath/java/util/zip/ZipFile.java +++ b/classpath/java/util/zip/ZipFile.java @@ -103,11 +103,9 @@ public InputStream getInputStream(ZipEntry entry) throws IOException { int remaining = uncompressedSize(window, pointer); public int read() throws IOException { - int c = super.read(); - if (c >= 0) { - -- remaining; - } - return c; + byte[] buffer = new byte[1]; + int c = read(buffer); + return (c < 0 ? c : (buffer[0] & 0xFF)); } public int read(byte[] buffer) throws IOException {