Reading rar-content into memory using Java (4)

1 Name: #!/usr/bin/anonymous : 2008-06-26 12:25 ID:LdvOIobC

I've already done it for zip in my Java program which was pretty straight forward and thought I'd expand it to cover the other most common format rar as well. But I can't find any information about reading the content of rar files to memory.

http://forum.java.sun.com/thread.jspa?threadID=5193691

It is the best example I've found of extracting to disc. I'm no code guru so I might be missing some obvious change you could do to that code to write to memory instead disc.

So if someone could tell me how to change it to reading into a BufferedImage or so instead of to a File, or have some good links to other ways of reading/unpacking rar-content to memory it would be a real help.

2 Name: #!/usr/bin/anonymous : 2008-06-26 13:21 ID:ELkTrT2v

Your best bet is using unrar.dll and writing a JNI wrapper. It's possible to do this without going via disk.

3 Name: #!/usr/bin/anonymous : 2008-06-26 13:22 ID:Heaven

Or I guess you could try using JNA to access the DLL directly.

4 Name: #!/usr/bin/anonymous : 2008-06-27 01:09 ID:Heaven

http://www.koders.com/c/fid0B01FB69E652B633384A49891D6082E2852657DD.aspx

JNI is for pussies, and dear god why do you want to read RAR files?

This thread has been closed. You cannot post in this thread any longer.