Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Deepak Kumar
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you had a look at the FormFile javadocs? For getting an InputStream, do any of its methods suggest themselves?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic