Package org.tukaani.xz

Examples of org.tukaani.xz.XZOutputStream


     * Creates a new XZ compressor using the default LZMA2 options.
     * This is equivalent to <code>XZCompressorOutputStream(6)</code>.
     */
    public XZCompressorOutputStream(OutputStream outputStream)
            throws IOException {
        out = new XZOutputStream(outputStream, new LZMA2Options());
    }
View Full Code Here


     * 16&nbsp;MiB, or 32&nbsp;MiB, it is waste of memory to use the
     * presets 7, 8, or 9, respectively.
     */
    public XZCompressorOutputStream(OutputStream outputStream, int preset)
            throws IOException {
        out = new XZOutputStream(outputStream, new LZMA2Options(preset));
    }
View Full Code Here

     * Creates a new XZ compressor using the default LZMA2 options.
     * This is equivalent to <code>XZCompressorOutputStream(6)</code>.
     */
    public XZCompressorOutputStream(OutputStream outputStream)
            throws IOException {
        out = new XZOutputStream(outputStream, new LZMA2Options());
    }
View Full Code Here

     * 16&nbsp;MiB, or 32&nbsp;MiB, it is waste of memory to use the
     * presets 7, 8, or 9, respectively.
     */
    public XZCompressorOutputStream(OutputStream outputStream, int preset)
            throws IOException {
        out = new XZOutputStream(outputStream, new LZMA2Options(preset));
    }
View Full Code Here

    /**
     * {@inheritDoc}
     */
    @Override
    protected OutputStream wrapCompressInternal(OutputStream out) throws IOException {
        return new XZOutputStream(out, new LZMA2Options(level));
    }
View Full Code Here

        }

        @Override
        public void run() {
            try {
                try(XZOutputStream out = new XZOutputStream(sink, new LZMA2Options())) {
                    byte[] buffer = new byte[4096];
                    int count;
                    while((count = in.read(buffer)) != -1) {
                        try {
                            out.write(buffer, 0, count);
                        } catch (IOException e) {
                            // ok we're done here
                        }
                    }
                }
View Full Code Here

TOP

Related Classes of org.tukaani.xz.XZOutputStream

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.