• 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:
  • Campbell Ritchie
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

Reading rar file without extracting it

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ,

I want to know how to read the archived files with rar extension.
I have about 10000 text files. I dont want to extract the file as the text files are very big and i am using winrar 2.9 version.
I want just to read the contents of the text file without extracting rar file.

Please help me.......... Waiting for some response....
 
Ranch Hand
Posts: 820
IntelliJ IDE VI Editor Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Shiva Kumar V wrote:Hi ,
I want just to read the contents of the text file without extracting rar file.



I hope you mean you want to look at the list of files contained in the rar file. RARoScope is a library that can do this. If you really want to read the contents of the compressed text files, you have to uncompress (=extract) them to read them!

 
Shiva Kumar V
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Tim..... But i want to read the file without extracting.
 
Bartender
Posts: 2856
10
Firefox Browser Fedora Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Shiva Kumar V " welcome to Javaranch
please check your private messages for an important administrative matter. You can check them by clicking the My Private Messages link above.
 
Master Rancher
Posts: 4661
63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Shiva Kumar V wrote:Thanks Tim..... But i want to read the file without extracting.


Sure, no problem:

There you go - you've read every byte in the file, and you haven't extracted anything.

If you wanted something else, perhaps you could share with us how "reading" a file would be different from "extracting" the file. I can think of several possible interpretations (such as the one I just gave), but I don't want to play guessing games here. Tim has already made a reasonable attempt at guessing what you meant, and you replied by repeating exactly what you'd said the first time, with no additional detail. That's not really helpful here. People are trying to help you, but you need to try to better explain what it is that you need. Good luck.
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check out ZipInputStream andGZipInputStream.
 
Mike Simmons
Master Rancher
Posts: 4661
63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
(But don't anyone tell him that those classes extract files from compressed formats, because that would violate the requirements.) ;)
 
And then the entire population worshiped me like unto a god. Well, me and this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic