Package lzma

Examples of lzma.LzmaDecoder


            throw new IOException("Uncompressed LZMA buffer is too large for byte buffers");
        }
       
        ByteBuffer bbu = ByteBuffer.allocateDirect((int) lzmaSize);
       
        LzmaDecoder dec = new LzmaDecoder();
        if (!dec.setDecoderProperties(lzmaProps)) {
            throw new IOException("Invalid LZMA props");
        }
       
        ScheduledExecutorService executor = Executors.newSingleThreadScheduledExecutor();
        executor.scheduleAtFixedRate(new ByteBufferProgress(bbc), 2, 1, TimeUnit.SECONDS);
       
        try {
            InputStream is = new ByteBufferInputStream(bbc);
            OutputStream os = new ByteBufferOutputStream(bbu);
            if (!dec.code(is, os, lzmaSize)) {
                throw new IOException("LZMA decoding error");
            }
        } finally {   
            executor.shutdown();
        }
View Full Code Here

TOP

Related Classes of lzma.LzmaDecoder

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.