List of usage examples for org.apache.commons.compress.archivers.cpio CpioArchiveInputStream getNextEntry
public ArchiveEntry getNextEntry() throws IOException
From source file:de.dentrassi.eclipse.rpm.editor.EditorImpl.java
private RpmInformation load(final InputStream stream) { try (RpmInputStream in = new RpmInputStream(stream)) { final RpmLead lead = in.getLead(); final InputHeader<RpmTag> header = in.getPayloadHeader(); final InputHeader<RpmSignatureTag> sigHeader = in.getSignatureHeader(); final CpioArchiveInputStream cpio = in.getCpioStream(); ArchiveEntry entry;// ww w.j a v a 2 s . c o m final List<FileEntry> files = new ArrayList<>(); while ((entry = cpio.getNextEntry()) != null) { final FileEntry fe = new FileEntry(entry.getName(), entry.getSize(), entry.getLastModifiedDate().toInstant()); files.add(fe); } return new RpmInformation(lead, header, sigHeader, files); } catch (final IOException e) { return null; } }