@Override
public ComponentCheckDTO importZip(MultipartFile multipartFile) throws IOException {
ComponentCheckDTO componentCheckDTO = new ComponentCheckDTO();
//获取ZIP输入流(指定字符集)
ZipInputStream zipInputStream = new ZipInputStream(new BufferedInputStream(multipartFile.getInputStream()), StandardCharsets.UTF_8);
//定义ZipEntry置为null,避免由于重复调用zipInputStream.getNextEntry造成的不必要的问题
ZipEntry ze = null;
//循环遍历
while ((ze = zipInputStream.getNextEntry()) != null) {
System.out.println("文件名:" + ze.getName() + " 文件大小:" + ze.getSize() +
08-02
3845
3845
09-14
2839
2839

最低0.47元/天 解锁文章

被折叠的 条评论
为什么被折叠?



