Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Beginning Java
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Tim Cooke
Campbell Ritchie
paul wheaton
Ron McLeod
Devaka Cooray
Sheriffs:
Jeanne Boyarsky
Liutauras Vilda
Paul Clapham
Saloon Keepers:
Tim Holloway
Carey Brown
Piet Souris
Bartenders:
Forum:
Beginning Java
I cant read zip files content
ali ak
Greenhorn
Posts: 17
posted 10 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi,everybody I am fallowing programming tutorials on youtube.And this code is for reading zip files content.I did the same things like in the video.But Code dosent work .I dont get any exceptions What is wrong here
try { ZipInputStream zis= new ZipInputStream(new FileInputStream("C:\\Users\\xxx\\Desktop\\try.rar")); ZipEntry zip; while((zip=zis.getNextEntry())!=null){ jTextArea1.append(zip.getName()); zis.closeEntry(); } zis.close(); } catch (FileNotFoundException ex) { Logger.getLogger(Zip.class.getName()).log(Level.SEVERE, null, ex); } catch (IOException ex) { Logger.getLogger(Zip.class.getName()).log(Level.SEVERE, null, ex); }
Knute Snortum
Sheriff
Posts: 7126
185
I like...
posted 10 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Welcome to the ranch, ali.
zip
is probably
null
in line 7. I don't think
ZipInputStream
can handle RAR files easily. Check out this
SO entry
.
All things are lawful, but not all things are profitable.
ali ak
Greenhorn
Posts: 17
posted 10 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Thank you friend .
Consider Paul's
rocket mass heater
.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Extraction code
problem using getSize on classes in jar file
zipEntry.getComment() returns null
How to unzip a zip file which contains another zip file?
failed to unzip uploaded file with ZipInputStream
More...