This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Java in General and the fly likes reading file from jar - Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Java in General
Bookmark "reading file from jar - Problem" Watch "reading file from jar - Problem" New topic
Author

reading file from jar - Problem

Ganesh Gowtham
Ranch Hand

Joined: Mar 30, 2005
Posts: 225

Hi Folks !!!
i am trying to read the content of class files from jar .
though i can able to get the entry names from jar , i cant able to read the content .

below is the code whichi am using .


Please sugesst how to go ahead .
Thanks


Thanks, Ganesh Gowtham
http://ganesh.gowtham.googlepages.com
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19697
    
  20

Read from the JarInputStream directly. Everytime you call getNextJarEntry it positions itself to the next entry, and you can read its contents until all is read (read returns -1). Then you call getNextJarEntry again and read all again.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
GeeCON Prague 2014
 
subject: reading file from jar - Problem