Examples of Pack200CompressorOutputStream


Examples of org.apache.commons.compress.compressors.pack200.Pack200CompressorOutputStream

            });
        setFactory(new CompressorStreamFactory() {
                public CompressorOutputStream
                    getCompressorStream(OutputStream stream)
                    throws IOException {
                    return new Pack200CompressorOutputStream(stream,
                                                             strategy
                                                             .getStrategy(),
                                                             properties);
                }
                public CompressorInputStream
View Full Code Here

Examples of org.apache.commons.compress.compressors.pack200.Pack200CompressorOutputStream

    /**
     * @param stream the stream to write to, should be buffered
     */
    public CompressorOutputStream getCompressorStream(OutputStream stream)
        throws IOException {
        return new Pack200CompressorOutputStream(stream);
    }
View Full Code Here

Examples of org.apache.commons.compress.compressors.pack200.Pack200CompressorOutputStream

            if (XZ.equalsIgnoreCase(name)) {
                return new XZCompressorOutputStream(out);
            }

            if (PACK200.equalsIgnoreCase(name)) {
                return new Pack200CompressorOutputStream(out);
            }

        } catch (IOException e) {
            throw new CompressorException(
                    "Could not create CompressorOutputStream", e);
View Full Code Here

Examples of org.apache.commons.compress.compressors.pack200.Pack200CompressorOutputStream

            if (XZ.equalsIgnoreCase(name)) {
                return new XZCompressorOutputStream(out);
            }

            if (PACK200.equalsIgnoreCase(name)) {
                return new Pack200CompressorOutputStream(out);
            }

        } catch (IOException e) {
            throw new CompressorException(
                    "Could not create CompressorOutputStream", e);
View Full Code Here

Examples of org.apache.commons.compress.compressors.pack200.Pack200CompressorOutputStream

            if (XZ.equalsIgnoreCase(name)) {
                return new XZCompressorOutputStream(out);
            }

            if (PACK200.equalsIgnoreCase(name)) {
                return new Pack200CompressorOutputStream(out);
            }

        } catch (IOException e) {
            throw new CompressorException(
                    "Could not create CompressorOutputStream", e);
View Full Code Here

Examples of org.apache.commons.compress.compressors.pack200.Pack200CompressorOutputStream

            if (XZ.equalsIgnoreCase(name)) {
                return new XZCompressorOutputStream(out);
            }

            if (PACK200.equalsIgnoreCase(name)) {
                return new Pack200CompressorOutputStream(out);
            }

        } catch (IOException e) {
            throw new CompressorException(
                    "Could not create CompressorOutputStream", e);
View Full Code Here

Examples of org.apache.commons.compress.compressors.pack200.Pack200CompressorOutputStream

            if (BZIP2.equalsIgnoreCase(name)) {
                return new BZip2CompressorOutputStream(out);
            }

            if (PACK200.equalsIgnoreCase(name)) {
                return new Pack200CompressorOutputStream(out);
            }

        } catch (IOException e) {
            throw new CompressorException(
                    "Could not create CompressorOutputStream", e);
View Full Code Here

Examples of org.apache.commons.compress.compressors.pack200.Pack200CompressorOutputStream

        final File file1 = getFile("test1.xml");
        final File file2 = getFile("test2.xml");

        final OutputStream out =
            new Pack200CompressorOutputStream(new FileOutputStream(output),
                                              mode);
        try {
            final ArchiveOutputStream os = new ArchiveStreamFactory()
                .createArchiveOutputStream("jar", out);

            os.putArchiveEntry(new ZipArchiveEntry("testdata/test1.xml"));
            IOUtils.copy(new FileInputStream(file1), os);
            os.closeArchiveEntry();

            os.putArchiveEntry(new ZipArchiveEntry("testdata/test2.xml"));
            IOUtils.copy(new FileInputStream(file2), os);
            os.closeArchiveEntry();

            os.close();
        } finally {
            out.close();
        }

        final InputStream is = new Pack200CompressorInputStream(output);
        try {
            final ArchiveInputStream in = new ArchiveStreamFactory()
View Full Code Here

Examples of org.apache.commons.compress.compressors.pack200.Pack200CompressorOutputStream

        final File output = new File(dir, "bla.pack");
        Map<String, String> m = new HashMap<String, String>();
        m.put("foo", "bar");
        final OutputStream out = new FileOutputStream(output);
        try {
            final OutputStream os = new Pack200CompressorOutputStream(out, m);
            os.write(1);
            os.write(new byte[] { 2, 3 });
            os.close();
        } finally {
            out.close();
        }
    }
View Full Code Here

Examples of org.apache.commons.compress.compressors.pack200.Pack200CompressorOutputStream

            if (XZ.equalsIgnoreCase(name)) {
                return new XZCompressorOutputStream(out);
            }

            if (PACK200.equalsIgnoreCase(name)) {
                return new Pack200CompressorOutputStream(out);
            }

        } catch (IOException e) {
            throw new CompressorException(
                    "Could not create CompressorOutputStream", e);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.