Код: Выделить всё
public ReferenceGroup forEach(ZipEntryConsumer zipEntryConsumer) {
ReferenceGroup referenceGroup = null;
try (InputStream s3ResourceInputStream = this.s3Resource.getInputStream(); ZipInputStream zipInputStream = new ZipInputStream(s3ResourceInputStream)) {
LocalFileHeader localFileHeader;
while ((localFileHeader = zipInputStream.getNextEntry()) != null) {
Path path = Paths.get(localFileHeader.getFileName());
boolean isDirectory = localFileHeader.isDirectory();
referenceGroup = zipEntryConsumer.accept(zipInputStream, path, isDirectory);
}
}
return referenceGroup;
}
Код: Выделить всё
│ Unhandled exception type IOException thrown by automatic close() invocation on s3ResourceInputStream Java (16778098) [28, 20]
│ Unhandled exception type IOException Java (16777384) [28, 44]
│ Unhandled exception type IOException thrown by automatic close() invocation on zipInputStream Java (16778098) [28, 93]
│ Unhandled exception type IOException Java (16777384) [30, 31]
Подробнее здесь: https://stackoverflow.com/questions/781 ... ile-errors