Meaningless Drivel is fun!*
The moose likes Struts and the fly likes how to unzip a file of type struts.upload.FormFile? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "how to unzip a file of type struts.upload.FormFile?" Watch "how to unzip a file of type struts.upload.FormFile?" New topic
Author

how to unzip a file of type struts.upload.FormFile?

Deepak Kumar
Ranch Hand

Joined: Nov 05, 2007
Posts: 62
Hi All,

I want to unzip a file of type FormFile.
I have a method ABC(FormFile ff), the file I will be getting is of zip file, when I checked the code for unzipping the file I found that the following code snippet
where the FileInputStream is constructed using a java.io.File inFile.
The problem that I have encountered now is that the file I am recieving is of type org.apache.struts.upload.FormFile from which I am unable to construct a FileInputStream object.

Please help me how can I unzip the zip file of type FormFile?

Thanks & Regards,
Deepak


Thanks,
Deepak
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41118
    
  45
Have you had a look at the FormFile javadocs? For getting an InputStream, do any of its methods suggest themselves?


Ping & DNS - my free Android networking tools app
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to unzip a file of type struts.upload.FormFile?
 
Similar Threads
How to write zip files into another zip file..?
Problem unzipping with ZipInputStream, containing filename with Swedish characters
Unzipping a .zip file containing .gif files
problems with unziping image files
GZipInputStream & ZipInputStream?