@SuppressWarnings("resource") @Override OutputStream encode(final OutputStream out, final Object opts) throws IOException { // NOOP as LZMAOutputStream throws an exception in flush return new FlushShieldFilterOutputStream(new LZMAOutputStream(out, getOptions(opts), false)); }
/** {@inheritDoc} */ @Override public void close() throws IOException { out.close(); } }
/** * Finishes compression without closing the underlying stream. * No more data can be written to this stream after finishing. * @throws IOException on error */ public void finish() throws IOException { out.finish(); }
/** {@inheritDoc} */ @Override public void write(final int b) throws IOException { out.write(b); }
/** {@inheritDoc} */ @Override public void write(final byte[] buf, final int off, final int len) throws IOException { out.write(buf, off, len); }
/** * Creates a LZMA compressor. * * @param outputStream the stream to wrap * @throws IOException on error */ public LZMACompressorOutputStream(final OutputStream outputStream) throws IOException { out = new LZMAOutputStream(outputStream, new LZMA2Options(), -1); }
/** {@inheritDoc} */ @Override public void write(final int b) throws IOException { out.write(b); }
/** * Finishes compression without closing the underlying stream. * No more data can be written to this stream after finishing. * @throws IOException on error */ public void finish() throws IOException { out.finish(); }
/** {@inheritDoc} */ @Override public void close() throws IOException { out.close(); } }
@SuppressWarnings("resource") @Override OutputStream encode(final OutputStream out, final Object opts) throws IOException { // NOOP as LZMAOutputStream throws an exception in flush return new FlushShieldFilterOutputStream(new LZMAOutputStream(out, getOptions(opts), false)); }
/** {@inheritDoc} */ @Override public void write(final byte[] buf, final int off, final int len) throws IOException { out.write(buf, off, len); }
/** * Creates a LZMA compressor. * * @param outputStream the stream to wrap * @throws IOException on error */ public LZMACompressorOutputStream(final OutputStream outputStream) throws IOException { out = new LZMAOutputStream(outputStream, new LZMA2Options(), -1); }
finalStream = new LZMAOutputStream(bufferedStream, new LZMA2Options(), -1); break; case DEFLATE: