ZipEntry: getName() : ZipEntry « java.util.zip « Java by API






ZipEntry: getName()

 
import java.io.FileInputStream;
import java.util.Date;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;

public class Main {
  public static void main(String[] args) throws Exception {
    FileInputStream fis = new FileInputStream(args[0]);
    ZipInputStream zis = new ZipInputStream(fis);

    ZipEntry ze;
    while ((ze = zis.getNextEntry()) != null)
      System.out.println(ze.getName() + "  [" + ze.getSize() + "]  ["
          + new Date(ze.getTime()).toString() + "]");
  }
}

   
  








Related examples in the same category

1.ZipEntry.DEFLATED
2.ZipEntry.STORED
3.new ZipEntry(String name)
4.ZipEntry: getCompressedSize()
5.ZipEntry: getComment()
6.ZipEntry: getCrc()
7.ZipEntry: getSize()
8.ZipEntry: getTime()
9.ZipEntry: isDirectory()