Friday, 13 September 2013

Extract content of Zip file after reading Zip file from Exchange server through JavaMail

Extract content of Zip file after reading Zip file from Exchange server
through JavaMail

Here is the program which reads the content of a ZIP file.
http://www.java2s.com/Code/Java/File-Input-Output/ReadingtheContentsofaZIPFile.htm
But my problem here is this line : ZipFile zf = new
ZipFile("C:/ReadZip.zip");
In above ZipFile constructor it is passing path of the ZIP file.
In my case I don't have that ZIP file stored anywhere. In my case I am
first reading that ZIP file from the exchange email account through
JavaMail API and then I need to read the content of that ZIP file.
Through JavaMail I am able to connect to exchange and read the email and
extract the attachment and then see if that attachment is a zip file - all
that is working - now I have the zip file - how I dynamically pass to
ZipFile constructor ZipFile zf = new ZipFile("C:/ReadZip.zip");
Really appreciate your help in this. I need to get this done over the
weekend.
Thank you.

No comments:

Post a Comment