Как читать архива: 5 Январь 2009 by admin·0 Comments Этот образец кода прочитать имя все файлы из архива:. Он использует ZipInputStream следующего файла Zip. import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; public class ZipFileRdrExp { public static void main(String[] args) { try { FileInputStream fis = new FileInputStream("C:\\MyZip.zip"); ZipInputStream zis = new ZipInputStream(fis); ZipEntry ze; while((ze=zis.getNextEntry())!=null){ System.out.println(ze.getName()); zis.closeEntry(); } zis.close(); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } } other