/** * Writes next block of compressed data to the output stream. * @throws IOException on error */ protected final void deflate() throws IOException { streamCompressor.deflate(); }
void flushDeflater() throws IOException { def.finish(); while (!def.finished()) { deflate(); } }
private void deflateUntilInputIsNeeded() throws IOException { while (!def.needsInput()) { deflate(); } }
/** * 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())); }
/** * Writes next block of compressed data to the output stream. * @throws IOException on error */ protected final void deflate() throws IOException { streamCompressor.deflate(); }
void flushDeflater() throws IOException { def.finish(); while (!def.finished()) { deflate(); } }
private void deflateUntilInputIsNeeded() throws IOException { while (!def.needsInput()) { deflate(); } }
/** * 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())); }