Package com.dotcms.repackage.org.apache.commons.compress.compressors.bzip2

Examples of com.dotcms.repackage.org.apache.commons.compress.compressors.bzip2.BZip2CompressorOutputStream


            if (GZIP.equalsIgnoreCase(name)) {
                return new GzipCompressorOutputStream(out);
            }

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

            if (XZ.equalsIgnoreCase(name)) {
                return new XZCompressorOutputStream(out);
            }
View Full Code Here


        try {
            if ("gz".equalsIgnoreCase(name)) {
                return new GzipCompressorOutputStream(out);
            } else if ("bzip2".equalsIgnoreCase(name)) {
                return new BZip2CompressorOutputStream(out);
            }
        } catch (IOException e) {
            throw new CompressorException(
                    "Could not create CompressorOutputStream", e);
        }
View Full Code Here

  @Override
  public ByteBuffer compress(ByteBuffer uncompressedData) throws IOException {

    ByteArrayOutputStream baos = getOutputBuffer(uncompressedData.remaining());
    BZip2CompressorOutputStream outputStream = new BZip2CompressorOutputStream(baos);

    try {
      outputStream.write(uncompressedData.array());
    } finally {
      outputStream.close();
    }

    ByteBuffer result = ByteBuffer.wrap(baos.toByteArray());
    return result;
  }
View Full Code Here

  @Override
  public ByteBuffer compress(ByteBuffer uncompressedData) throws IOException {

    ByteArrayOutputStream baos = getOutputBuffer(uncompressedData.remaining());
    BZip2CompressorOutputStream outputStream = new BZip2CompressorOutputStream(baos);

    try {
      outputStream.write(uncompressedData.array(),
                         uncompressedData.position(),
                         uncompressedData.remaining());
    } finally {
      outputStream.close();
    }

    ByteBuffer result = ByteBuffer.wrap(baos.toByteArray());
    return result;
  }
View Full Code Here

            return new BZip2CompressorInputStream(in);
        }
        @Override
        OutputStream encode(final OutputStream out, final byte[] password)
                throws IOException {
            return new BZip2CompressorOutputStream(out);
        }
View Full Code Here

            if (GZIP.equalsIgnoreCase(name)) {
                return new GzipCompressorOutputStream(out);
            }

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

            if (XZ.equalsIgnoreCase(name)) {
                return new XZCompressorOutputStream(out);
            }
View Full Code Here

                os = new GZIPOutputStream(os);
                name = FilenameUtils.removeExtension(name);
                log.debug("   - from GZIP Archive");
            } else if ("bz2".equalsIgnoreCase(FilenameUtils.getExtension(name))) {
                is = new BZip2CompressorInputStream(is);
                os = new BZip2CompressorOutputStream(os);
                name = FilenameUtils.removeExtension(name);
                log.debug("   - from BZip2 Archive");
            }// TODO: No Zip File support
            //else no complression
            BlockingQueue<String> queue = new ArrayBlockingQueue<String>(1000);
View Full Code Here

            out = new ZipOutputStream(out);
            ((ZipOutputStream)out).putNextEntry(new ZipEntry("entity-ids.txt"));
        } else if("gz".equalsIgnoreCase(extension)) {
            out = new GZIPOutputStream(out);
        } else if("bz2".equalsIgnoreCase(extension)) {
            out = new BZip2CompressorOutputStream(out);
        }
        return out;
    }
View Full Code Here

            if (GZIP.equalsIgnoreCase(name)) {
                return new GzipCompressorOutputStream(out);
            }

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

            if (PACK200.equalsIgnoreCase(name)) {
                return new Pack200CompressorOutputStream(out);
            }
View Full Code Here

  private final ArchiveCommand.Format<ArchiveOutputStream> tarFormat = new TarFormat();

  public ArchiveOutputStream createArchiveOutputStream(OutputStream s)
      throws IOException {
    BZip2CompressorOutputStream out = new BZip2CompressorOutputStream(s);
    return tarFormat.createArchiveOutputStream(out);
  }
View Full Code Here

TOP

Related Classes of com.dotcms.repackage.org.apache.commons.compress.compressors.bzip2.BZip2CompressorOutputStream

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.