/** * Add an archive entry to this scatter stream. * * @param zipArchiveEntryRequest The entry to write. * @throws IOException If writing fails */ public void addArchiveEntry(final ZipArchiveEntryRequest zipArchiveEntryRequest) throws IOException { try (final InputStream payloadStream = zipArchiveEntryRequest.getPayloadStream()) { streamCompressor.deflate(payloadStream, zipArchiveEntryRequest.getMethod()); } items.add(new CompressedEntry(zipArchiveEntryRequest, streamCompressor.getCrc32(), streamCompressor.getBytesWrittenForLastEntry(), streamCompressor.getBytesRead())); }
/** * Add an archive entry to this scatter stream. * * @param zipArchiveEntryRequest The entry to write. * @throws IOException If writing fails */ public void addArchiveEntry(final ZipArchiveEntryRequest zipArchiveEntryRequest) throws IOException { try (final InputStream payloadStream = zipArchiveEntryRequest.getPayloadStream()) { streamCompressor.deflate(payloadStream, zipArchiveEntryRequest.getMethod()); } items.add(new CompressedEntry(zipArchiveEntryRequest, streamCompressor.getCrc32(), streamCompressor.getBytesWrittenForLastEntry(), streamCompressor.getBytesRead())); }