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

Inflater.finished() never returns true with Netscape or HotJava

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P4 P4
    • None
    • 1.1.8
    • core-libs
    • x86
    • windows_nt



      Name: yyT116575 Date: 01/10/2001


      java version "1.1.8"

      When inflating a compress data (cdata), with Netscape 4.7 or HotJava the
      finished method does not return true. It works fine with MSIE5.5 and works also
      when Java 2 RTE Std v1.3 is installed.

      public void uncompress(int origsize, int csize)
        {
            data = new byte[origsize];
            count = 0;
            int offsetout = 0;
            int offsetin = 0 ;
            try {
             do {
                offsetin = inflater.getTotalIn();
                offsetout = inflater.getTotalOut();
                  if (inflater.needsInput()) {
                    inflater.setInput(cdata, offsetin, csize-offsetin);
                   }
                  inflater.inflate(data, offsetout, origsize-offsetout);
                offsetin = inflater.getTotalIn();
                offsetout = inflater.getTotalOut();
                System.out.println("offsetin "+offsetin+" offsetout "+offsetout+"finished "
      +inflater.finished()+" need input "+inflater.needsInput()+" remain"+inflater.getRemaining());

             } while ( ! inflater.finished() );
             count = inflater.getTotalOut();
             int remain = inflater.getRemaining();
             System.out.println("Total uncompress "+count+" origsize "+origsize+" comp"
      +csize+" total in "+offsetin+" remain "+remain);
            }
            catch ( Exception ex ) {
             ex.printStackTrace();
            }
            inflater.end();
        }
      (Review ID: 114866)
      ======================================================================

            kkladkosunw Konstantin Kladko (Inactive)
            yyoungsunw Yung-ching Young (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: