You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Kyle Cho (JIRA)" <ji...@apache.org> on 2009/05/29 20:30:46 UTC
[jira] Created: (HARMONY-6217) problem with
DeflaterOutputStream/Deflater
problem with DeflaterOutputStream/Deflater
------------------------------------------
Key: HARMONY-6217
URL: https://issues.apache.org/jira/browse/HARMONY-6217
Project: Harmony
Issue Type: Bug
Components: Classlib
Affects Versions: 5.0M10
Environment: RedHat EL 5 x86
Reporter: Kyle Cho
Priority: Minor
The test below fails.
import java.util.zip.*;
import java.io.*;
class Decomp {
public static void main(String args[]) throws Exception
{
double data[] = {1.0, 2.0, 3.0, 4.0, 5.0};
Deflater def = new Deflater();
DataOutputStream dos = new DataOutputStream(new DeflaterOutputStream(new FileOutputStream("data.txt"), def));
dos.writeInt(data.length);
for (int i = 0; i < data.length; i++)
dos.writeDouble(data[i]);
dos.close();
System.out.println("Total written: "+def.getTotalOut());
}
}
Uncaught exception in main:
java.lang.IllegalStateException
at java.util.zip.Deflater.getTotalOut(Deflater.java:282)
at Decomp.main(Decomp.java:13)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-6217) problem with
DeflaterOutputStream/Deflater
Posted by "Li Jing Qin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12714970#action_12714970 ]
Li Jing Qin commented on HARMONY-6217:
--------------------------------------
Hi guys, the exception is thrown because we have end the Deflater by dos.close() first. After end the Deflator, no more information would be stored.
I suggest that we can store the io information when we end the Deflater for the later use, just like this case.
> problem with DeflaterOutputStream/Deflater
> ------------------------------------------
>
> Key: HARMONY-6217
> URL: https://issues.apache.org/jira/browse/HARMONY-6217
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Affects Versions: 5.0M10
> Environment: RedHat EL 5 x86
> Reporter: Kyle Cho
> Priority: Minor
>
> The test below fails.
> import java.util.zip.*;
> import java.io.*;
> class Decomp {
> public static void main(String args[]) throws Exception
> {
> double data[] = {1.0, 2.0, 3.0, 4.0, 5.0};
> Deflater def = new Deflater();
> DataOutputStream dos = new DataOutputStream(new DeflaterOutputStream(new FileOutputStream("data.txt"), def));
> dos.writeInt(data.length);
> for (int i = 0; i < data.length; i++)
> dos.writeDouble(data[i]);
> dos.close();
> System.out.println("Total written: "+def.getTotalOut());
> }
> }
> Uncaught exception in main:
> java.lang.IllegalStateException
> at java.util.zip.Deflater.getTotalOut(Deflater.java:282)
> at Decomp.main(Decomp.java:13)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-6217) problem with
DeflaterOutputStream/Deflater
Posted by "Li Jing Qin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6217?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Li Jing Qin updated HARMONY-6217:
---------------------------------
Attachment: HARMONY-6217.diff
Would anyone want to try this?
> problem with DeflaterOutputStream/Deflater
> ------------------------------------------
>
> Key: HARMONY-6217
> URL: https://issues.apache.org/jira/browse/HARMONY-6217
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Affects Versions: 5.0M10
> Environment: RedHat EL 5 x86
> Reporter: Kyle Cho
> Priority: Minor
> Attachments: HARMONY-6217.diff
>
>
> The test below fails.
> import java.util.zip.*;
> import java.io.*;
> class Decomp {
> public static void main(String args[]) throws Exception
> {
> double data[] = {1.0, 2.0, 3.0, 4.0, 5.0};
> Deflater def = new Deflater();
> DataOutputStream dos = new DataOutputStream(new DeflaterOutputStream(new FileOutputStream("data.txt"), def));
> dos.writeInt(data.length);
> for (int i = 0; i < data.length; i++)
> dos.writeDouble(data[i]);
> dos.close();
> System.out.println("Total written: "+def.getTotalOut());
> }
> }
> Uncaught exception in main:
> java.lang.IllegalStateException
> at java.util.zip.Deflater.getTotalOut(Deflater.java:282)
> at Decomp.main(Decomp.java:13)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.