i closed properlly, eventhough iam getting same problem
chinnasri
Posts
-
Regarding zip files in java [modified] -
Regarding zip files in java [modified]Hi , ANYONE LET ME KNOW WHAT IS GOING WRONG HER, I AM TRYING TO CREATE ZIP FILE IN JAVA, BUE IAM GETTING THE ERROR AS FALLOWS, GO THRU THE CODE ALSO WHAT I WROTE import java.util.zip.*;import java.io.*; public class ZipFileExample { public static void main(String args[])throws IOException { FileInputStream fis=new FileInputStream("Allpaths.txt"); FileOutputStream fos=new FileOutputStream("kkk.txt"); DeflaterOutputStream dos=new DeflaterOutputStream(fos); int data; while((data=fis.read())!=-1){ dos.write(data); fis.close(); dos.close(); } } } eRROR: Exception in thread "main" java.io.FileNotFoundException: Allpaths.txt (The system cannot find the file specified) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(Unknown Source) at java.io.FileInputStream.<init>(Unknown Source) at ZipFileExample.main(ZipFileExample.java:4)
modified on Thursday, July 16, 2009 11:06 PM