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

Exception in java.util.zip.InflaterInputStream

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 1.2.0
    • tools
    • jar
    • generic
    • generic



      Name: dgC58589 Date: 01/13/98


      Use jar -cvfM or WinZip to compress:

      java/text/resources/LocaleElements_pl.java
      java/lang/Math.java

      Then use the following code to uncompress:

      import java.io.*;
      import java.util.zip.*;
      final class show {
              public static void main(final String args[]) throws IOException {
                      final ZipFile zf = new ZipFile(args[0]);
                      final ZipEntry ze = zf.getEntry(args[1]);
                      final InputStream is = zf.getInputStream(ze);
                      byte[] b = new byte[1];
                      while (is.read(b) > 0) System.out.write(b);
                      is.close();
              }
      }

      java show <archive> <file>
      ...
      java.io.EOFException: Unexpected end of ZLIB input stream
              at java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:156)
              at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:119)
              at java.io.FilterInputStream.read(FilterInputStream.java:109)
              at show.main(show.java:10)

      (Review ID: 23030)
      ======================================================================

            dconnellsunw David Connelly (Inactive)
            dgrahamcsunw David Graham-cumming (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: