
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 -- Sofie Van Landeghem PhD Student VIB Department of Plant Systems Biology, Ghent University Bioinformatics and Systems Biology Technologiepark 927, 9052 Gent, BELGIUM Tel: +32 (0)9 331 36 95 Website: http://bioinformatics.psb.ugent.be

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

De files zelf zijn niet groot (paar KB), dus het kan niet zo'n kwaad om volledig in memory te steken (gesteld dat ze daar niet blijven zitten). Tnx voor pointer, 'k ga dat eens uitproberen! Sofie Thomas Abeel wrote:
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
_______________________________________________ Binari Implicitly Neglects All Recursive Iterations https://maillist.psb.ugent.be/mailman/listinfo/binari
-- Sofie Van Landeghem PhD Student VIB Department of Plant Systems Biology, Ghent University Bioinformatics and Systems Biology Technologiepark 927, 9052 Gent, BELGIUM Tel: +32 (0)9 331 36 95 Website: http://bioinformatics.psb.ugent.be

Een dagje frustratie en een volle datamining share later, onze vriend google legt uit "untar would go into infinite loop for some invalid tar files." Fijn! Sofie Sofie Van Landeghem wrote:
De files zelf zijn niet groot (paar KB), dus het kan niet zo'n kwaad om volledig in memory te steken (gesteld dat ze daar niet blijven zitten). Tnx voor pointer, 'k ga dat eens uitproberen!
Sofie
Thomas Abeel wrote:
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
_______________________________________________ Binari Implicitly Neglects All Recursive Iterations https://maillist.psb.ugent.be/mailman/listinfo/binari
-- Sofie Van Landeghem PhD Student VIB Department of Plant Systems Biology, Ghent University Bioinformatics and Systems Biology Technologiepark 927, 9052 Gent, BELGIUM Tel: +32 (0)9 331 36 95 Website: http://bioinformatics.psb.ugent.be
------------------------------------------------------------------------
_______________________________________________ Binari Implicitly Neglects All Recursive Iterations https://maillist.psb.ugent.be/mailman/listinfo/binari
-- Sofie Van Landeghem PhD Student VIB Department of Plant Systems Biology, Ghent University Bioinformatics and Systems Biology Technologiepark 927, 9052 Gent, BELGIUM Tel: +32 (0)9 331 36 95 Website: http://bioinformatics.psb.ugent.be

Voor wie het nog kan interesseren, of het later nodig heeft, of anders voor de archieven: De apache ant jar gebruiken ipv de jar van de auteur zelf, heeft het probleem gefixt. Nu nog uitvissen waarom mijn data in corrupte jars zit. ;-) tralala, Sofie Sofie Van Landeghem wrote:
Een dagje frustratie en een volle datamining share later, onze vriend google legt uit
"untar would go into infinite loop for some invalid tar files."
Fijn!
Sofie
Sofie Van Landeghem wrote:
De files zelf zijn niet groot (paar KB), dus het kan niet zo'n kwaad om volledig in memory te steken (gesteld dat ze daar niet blijven zitten). Tnx voor pointer, 'k ga dat eens uitproberen!
Sofie
Thomas Abeel wrote:
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
_______________________________________________ Binari Implicitly Neglects All Recursive Iterations https://maillist.psb.ugent.be/mailman/listinfo/binari
-- Sofie Van Landeghem PhD Student VIB Department of Plant Systems Biology, Ghent University Bioinformatics and Systems Biology Technologiepark 927, 9052 Gent, BELGIUM Tel: +32 (0)9 331 36 95 Website: http://bioinformatics.psb.ugent.be
------------------------------------------------------------------------
_______________________________________________ Binari Implicitly Neglects All Recursive Iterations https://maillist.psb.ugent.be/mailman/listinfo/binari
-- Sofie Van Landeghem PhD Student VIB Department of Plant Systems Biology, Ghent University Bioinformatics and Systems Biology Technologiepark 927, 9052 Gent, BELGIUM Tel: +32 (0)9 331 36 95 Website: http://bioinformatics.psb.ugent.be
------------------------------------------------------------------------
_______________________________________________ Binari Implicitly Neglects All Recursive Iterations https://maillist.psb.ugent.be/mailman/listinfo/binari
-- Sofie Van Landeghem PhD Student VIB Department of Plant Systems Biology, Ghent University Bioinformatics and Systems Biology Technologiepark 927, 9052 Gent, BELGIUM Tel: +32 (0)9 331 36 95 Website: http://bioinformatics.psb.ugent.be

'tralala' ? Oh nee!!! Sofie begint het Tine blomme syndroom te krijgen ;-) k Sofie Van Landeghem wrote:
Voor wie het nog kan interesseren, of het later nodig heeft, of anders voor de archieven:
De apache ant jar gebruiken ipv de jar van de auteur zelf, heeft het probleem gefixt. Nu nog uitvissen waarom mijn data in corrupte jars zit. ;-)
tralala, Sofie
Sofie Van Landeghem wrote:
Een dagje frustratie en een volle datamining share later, onze vriend google legt uit
"untar would go into infinite loop for some invalid tar files."
Fijn!
Sofie
Sofie Van Landeghem wrote:
De files zelf zijn niet groot (paar KB), dus het kan niet zo'n kwaad om volledig in memory te steken (gesteld dat ze daar niet blijven zitten). Tnx voor pointer, 'k ga dat eens uitproberen!
Sofie
Thomas Abeel wrote:
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
_______________________________________________ Binari Implicitly Neglects All Recursive Iterations https://maillist.psb.ugent.be/mailman/listinfo/binari
-- Sofie Van Landeghem PhD Student VIB Department of Plant Systems Biology, Ghent University Bioinformatics and Systems Biology Technologiepark 927, 9052 Gent, BELGIUM Tel: +32 (0)9 331 36 95 Website: http://bioinformatics.psb.ugent.be
------------------------------------------------------------------------
_______________________________________________ Binari Implicitly Neglects All Recursive Iterations https://maillist.psb.ugent.be/mailman/listinfo/binari
-- Sofie Van Landeghem PhD Student VIB Department of Plant Systems Biology, Ghent University Bioinformatics and Systems Biology Technologiepark 927, 9052 Gent, BELGIUM Tel: +32 (0)9 331 36 95 Website: http://bioinformatics.psb.ugent.be
------------------------------------------------------------------------
_______________________________________________ Binari Implicitly Neglects All Recursive Iterations https://maillist.psb.ugent.be/mailman/listinfo/binari
-- Sofie Van Landeghem PhD Student VIB Department of Plant Systems Biology, Ghent University Bioinformatics and Systems Biology Technologiepark 927, 9052 Gent, BELGIUM Tel: +32 (0)9 331 36 95 Website: http://bioinformatics.psb.ugent.be
------------------------------------------------------------------------
_______________________________________________ Binari Implicitly Neglects All Recursive Iterations https://maillist.psb.ugent.be/mailman/listinfo/binari
-- Klaas Vandepoele, PhD Tel. 32 (0)9 33 13822 VIB Department of Plant Systems Biology, Ghent University Technologiepark 927, 9052 Gent, Belgium E-mail: Klaas.Vandepoele@psb.vib-ugent.be Website: http://bioinformatics.psb.ugent.be/ --------------------------------------------------------- PLAZA, a resource for Plant Comparative Genomics http://bioinformatics.psb.ugent.be/plaza/ ---------------------------------------------------------

vrouwen en kinderen eerst! On 09/16/2010 03:24 PM, Klaas Vandepoele wrote:
'tralala' ? Oh nee!!! Sofie begint het Tine blomme syndroom te krijgen ;-)
k
Sofie Van Landeghem wrote:
Voor wie het nog kan interesseren, of het later nodig heeft, of anders voor de archieven:
De apache ant jar gebruiken ipv de jar van de auteur zelf, heeft het probleem gefixt. Nu nog uitvissen waarom mijn data in corrupte jars zit. ;-)
tralala, Sofie
Sofie Van Landeghem wrote:
Een dagje frustratie en een volle datamining share later, onze vriend google legt uit
"untar would go into infinite loop for some invalid tar files."
Fijn!
Sofie
Sofie Van Landeghem wrote:
De files zelf zijn niet groot (paar KB), dus het kan niet zo'n kwaad om volledig in memory te steken (gesteld dat ze daar niet blijven zitten). Tnx voor pointer, 'k ga dat eens uitproberen!
Sofie
Thomas Abeel wrote:
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
_______________________________________________ Binari Implicitly Neglects All Recursive Iterations https://maillist.psb.ugent.be/mailman/listinfo/binari
-- Sofie Van Landeghem PhD Student VIB Department of Plant Systems Biology, Ghent University Bioinformatics and Systems Biology Technologiepark 927, 9052 Gent, BELGIUM Tel: +32 (0)9 331 36 95 Website:http://bioinformatics.psb.ugent.be
------------------------------------------------------------------------
_______________________________________________ Binari Implicitly Neglects All Recursive Iterations https://maillist.psb.ugent.be/mailman/listinfo/binari
-- Sofie Van Landeghem PhD Student VIB Department of Plant Systems Biology, Ghent University Bioinformatics and Systems Biology Technologiepark 927, 9052 Gent, BELGIUM Tel: +32 (0)9 331 36 95 Website:http://bioinformatics.psb.ugent.be
------------------------------------------------------------------------
_______________________________________________ Binari Implicitly Neglects All Recursive Iterations https://maillist.psb.ugent.be/mailman/listinfo/binari
-- Sofie Van Landeghem PhD Student VIB Department of Plant Systems Biology, Ghent University Bioinformatics and Systems Biology Technologiepark 927, 9052 Gent, BELGIUM Tel: +32 (0)9 331 36 95 Website:http://bioinformatics.psb.ugent.be
------------------------------------------------------------------------
_______________________________________________ Binari Implicitly Neglects All Recursive Iterations https://maillist.psb.ugent.be/mailman/listinfo/binari
--
Klaas Vandepoele, PhD Tel. 32 (0)9 33 13822 VIB Department of Plant Systems Biology, Ghent University Technologiepark 927, 9052 Gent, Belgium E-mail:Klaas.Vandepoele@psb.vib-ugent.be Website:http://bioinformatics.psb.ugent.be/ --------------------------------------------------------- PLAZA, a resource for Plant Comparative Genomics http://bioinformatics.psb.ugent.be/plaza/ ---------------------------------------------------------
_______________________________________________ Binari Implicitly Neglects All Recursive Iterations https://maillist.psb.ugent.be/mailman/listinfo/binari
-- Marijn Vandevoorde Tel:+32 (0)9 331 36 95 fax:+32 (0)9 3313809 VIB Department of Plant Systems Biology, Ghent University Technologiepark 927, 9052 Gent, BELGIUM marijn.vandevoorde@psb.vib-ugent.be http://www.psb.vib-ugent.be ==================================================================
participants (4)
-
Klaas Vandepoele
-
Marijn Vandevoorde
-
Sofie Van Landeghem
-
Thomas Abeel