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

Exception in java.util.zip.InflaterInputStream

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Duplicate
    • Affects Version/s: 1.2.0
    • Fix Version/s: None
    • Component/s: tools
    • Labels:
    • Subcomponent:
      jar
    • CPU:
      generic
    • OS:
      generic

      Description



      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)
      ======================================================================

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: