File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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: 42944
    
  68
Have you had a look at the FormFile javadocs? For getting an InputStream, do any of its methods suggest themselves?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to unzip a file of type struts.upload.FormFile?