I want to list all the entries of a tar file in my Java program. How is it possible ? For zip files, I can use the below code:
ZipFile zf = new ZipFile("ReadZip.zip");
Enumeration entries = zf.entries();
while (entries.hasMoreElements()) {.....}
但是,我不相信tar卷宗。 谁能提供帮助? 我使用的是org.apache.tools.tar.*
。