aspose file tools*
The moose likes Java in General and the fly likes How to read timestamp of a file present inside a ZIP/JAR/WAR file in java? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "How to read timestamp of a file present inside a ZIP/JAR/WAR file in java?" Watch "How to read timestamp of a file present inside a ZIP/JAR/WAR file in java?" New topic
Author

How to read timestamp of a file present inside a ZIP/JAR/WAR file in java?

Yogesh Gandhi
Ranch Hand

Joined: Dec 05, 2008
Posts: 212
I have a ZIP file, which has multiple files...

I want to know, the timestamp of a particular file present inside the ZIP file.

One way is, I have to iterate over all the present files that are present in the ZIP file and then I can get..

Is there any other better way to do that..??

One way is given at

http://www.thecoderscorner.com/team-blog/java-and-jvm/12-reading-a-zip-file-from-java-using-zipinputstream

Any better and efficient method... because I might neeed to read 50 files.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19761
    
  20

Check out ZipFile.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to read timestamp of a file present inside a ZIP/JAR/WAR file in java?