
TarInputStream tis=new TarInputStream(new GZIPInputStream(new FileInputstream(...))); http://www.docjar.com/docs/api/org/apache/tools/tar/TarInputStream.html apache-ant-<version>.jar heeft die klasse en wat erbij hoort Anders ook te downloaded van de originele auteur: http://www.trustice.com/java/tar/ Ik vind wel niet direct sample code, maar eens gauw proberen iets samen te kletsen TarEntry e=tis.getNextEntry() while(e!=null){ //do something // for example read it byte[]buffer=new byte[e.available()]; tis.read(buffer,0,buffer.length); //wss netter te doen met niet hele entries (files) tegelijk in memory te lezen e=tis.getNextEntry(); } cheers, Thomas Sofie Van Landeghem schreef:
Does anybody have experience with reading archive files in Java without actually unpacking them on the drive? I have a butload of tar.gz's I need to read in, but I'm wondering how to do this efficiently / without having to fill up the entire group share (accidently deleting people's personal pic's and music along the way)
Cheers, Sofie