harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mohanraj Loganathan (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-6623) [classlib][archive]Deflater.setlevel/setStrategy throws IllegalStateException if inputBuffer is not null
Date Fri, 13 Aug 2010 09:12:17 GMT
[classlib][archive]Deflater.setlevel/setStrategy throws IllegalStateException if inputBuffer
is not null
--------------------------------------------------------------------------------------------------------

                 Key: HARMONY-6623
                 URL: https://issues.apache.org/jira/browse/HARMONY-6623
             Project: Harmony
          Issue Type: Bug
          Components: Non-bug differences from RI
         Environment: Windows/Linux
            Reporter: Mohanraj Loganathan


Please consider the below testcase [1] . RI works fine. But Harmony throws IllegalStateException.
 

This is the same case with defl.setStrategy() function also.

[1] public void test () {
       byte[] byteArray = new byte[100];
       InputStream inFile = new FileInputStream(new File("Input.txt"));
                      //input.txt - any text file with some text in it.
       inFile.read(byteArray);
       inFile.close();
       Deflater defl = new Deflater();
       byte[] outPutBuf = new byte[500];
       defl.setInput(byteArray);
       defl.setLevel(2);
       while (!defl.needsInput()) {
           defl.deflate(outPutBuf);
       }
       defl.finish();
       while (!defl.finished()) {
           defl.deflate(outPutBuf);
       }

       int totalOut;
       totalOut = defl.getTotalOut();
       System.out.println("TotalOut=" + totalOut);
}



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message