Menu

#9 IOException from GZIPInputStream

open
nobody
None
5
2005-01-26
2005-01-26
Anonymous
No

Constructors of GZIPInputStream for not GZIP format
file does not throw IOException.
But java.util.zip.GZIPInputStream throws IOException.

This is test code I used.

import java.io.*;
import java.util.zip.*;
//import net.sf.jazzlib.*;

class ZipTest {
public static void main(String[] args) throws Exception
{
InputStream ins = null;
try {
ins = new GZIPInputStream(new FileInputStream
("test.txt"));
} catch (Exception e) {
if (ins != null) ins.close();
e.printStackTrace();
}
}
}

I think this is a compatibility problem.

My email address is wdo@handysoft.co.kr

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.