Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Regarding Extraction of data in .gif file  RSS feed

 
sreelakshmi kolla
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have one Zip file,in that there are .gif files.
what i need to do is i read i.e extract the information that .gif file and convert them to .doc file ??

For this i analysed in this way:
1)to unZip that file i used InflaterInputStream,after that i used FileOutputStream like this:

import java.io.*;
import java.util.zip.*;
public class ReadGif{
public static void main(String args[]) throws Exception{
FileInputStream fis=new FileInputStream("d:/Myapps/DATA") ;
FileOutputStream fos=new FileOutputStream("d:/Myapps/file3.txt");
InflaterInputStream iis=new InflaterInputStream(fis);
int dt;
while((dt=iis.read())!=-1){
fos.write(dt);
}
iis.close();
fos.close();
}
}

But it is showing Exception in thread "main " java.io.FileNotFoundException


whats wrong in that??
can you give the correct approach??
[ August 24, 2007: Message edited by: Ulf Dittmer ]
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you really have a zip file called "DATA" with no file extension? On which line is the exception thrown?

By the way, it's sufficient to end questions with a single question mark.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!