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

question about decompress?

 
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys,
we can decompress file with postfix .zip(use tool of winzip compressed) use jdk's ZipFile class,but How I can decompress file with postfix .rar(use tool of winrar compressed)?
I have renamed it with postfix .zip,but I got error.maybe it use different compress algorism than winzip.Are there any way that I can decompress .rar file?
thanx.
 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i never heard of an existing API for rar de/compression in java. i'm not sure either if the algorithm is available to public
here's a feasible workaround:
- get the native library e.g. UNRAR.DLL
- use JNI to call native methods
mavedrive;
 
dragon ji
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanx,Maverick,but would you please give a example using jni to call native method?
best regards
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
See Sun's JNI Tutorial.
The format is known, though, so another alternative is to write the decoder yourself. See this document from Wotsit's File Formats, a very useful web site!
 
Maverick Lasa
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Ernest,
Thanks for the link! Great site.
Dragon Ji,
Wotsit has info on the format.
Writing a decoder in pure java
could be better.
mavedrive;
 
dragon ji
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanx,guys.
I am in trying....
 
Maverick Lasa
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by dragon ji:
thanx,guys.
I am in trying....


Hello Ji,
Guess what I had found out!
See this page.
It has what you are looking for.
mavedrive;
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic