集册 Java实例教程 获取邮编

获取邮编

欢马劈雪     最近更新时间:2020-01-02 10:19:05

410
获取邮政编码条目

import java.io.IOException;

import java.util.Enumeration;

import java.util.zip.ZipEntry;
/*
来 自*
 NowJava.com - 时  代  Java
*/

import java.util.zip.ZipFile;


public class Main {


  public static void main(String args[]) {

    try {

      ZipFile zipFile = new ZipFile("c:/Folder/WebFiles.zip");


      Enumeration e = zipFile.entries();


      while (e.hasMoreElements()) {

        ZipEntry entry = (ZipEntry) e.nextElement();/** 时 代      J a v a   公   众 号 - nowjava.com 提 供 **/


        String comment = entry.getComment();


        if ("".equals(comment))

          System.out.println(comment + " found for entry " + entry.getName());

        else

          System.out.println(
展开阅读全文