比如说Image.zip中有1.gif,2.gif,3.gif,4.gif
我怎样才能只解压4.gif
求高手解答...
谢....有源码更谢.....!

解决方案 »

  1.   

    ZipInputStream zipInputStream = new ZipInputStream(inputStream);
    while (true) {
      ZipEntry nextEntry = zipInputStream.getNextEntry();
      if (nextEntry == null) {
        break;
      }
      if (nextEntry.isDirectory()) {
        throw new DSWFException("上传压缩包中包含文件夹!");
      }
      String name = nextEntry.getName();
      if (name.equals("4.gif")){
        //处理这个文件4.gif,即另存一个地方
      }
    }
    ......