~ubuntu-branches/ubuntu/utopic/libcommons-compress-java/utopic

« back to all changes in this revision

Viewing changes to src/main/java/org/apache/commons/compress/compressors/bzip2/BZip2CompressorOutputStream.java

  • Committer: Package Import Robot
  • Author(s): Emmanuel Bourg
  • Date: 2013-11-02 13:55:47 UTC
  • mfrom: (1.1.5)
  • Revision ID: package-import@ubuntu.com-20131102135547-nhcubj3ae7rv6t13
Tags: 1.6-1
* New upstream release
* Updated Standards-Version to 3.9.5 (no changes)
* Build depend on debhelper >= 9
* Removed the unused debian/orig-tar.sh script

Show diffs side-by-side

added added

removed removed

Lines of Context:
376
376
     * @see #MIN_BLOCKSIZE
377
377
     * @see #MAX_BLOCKSIZE
378
378
     */
379
 
    public BZip2CompressorOutputStream(final OutputStream out,
380
 
                                       final int blockSize)
381
 
        throws IOException {
382
 
        super();
383
 
 
 
379
    public BZip2CompressorOutputStream(final OutputStream out, final int blockSize) throws IOException {
384
380
        if (blockSize < 1) {
385
 
            throw new IllegalArgumentException("blockSize(" + blockSize
386
 
                                               + ") < 1");
 
381
            throw new IllegalArgumentException("blockSize(" + blockSize + ") < 1");
387
382
        }
388
383
        if (blockSize > 9) {
389
 
            throw new IllegalArgumentException("blockSize(" + blockSize
390
 
                                               + ") > 9");
 
384
            throw new IllegalArgumentException("blockSize(" + blockSize + ") > 9");
391
385
        }
392
386
 
393
387
        this.blockSize100k = blockSize;
398
392
        init();
399
393
    }
400
394
 
401
 
    /** {@inheritDoc} */
402
395
    @Override
403
396
    public void write(final int b) throws IOException {
404
397
        if (this.out != null) {
1327
1320
        int origPtr;
1328
1321
 
1329
1322
        Data(int blockSize100k) {
1330
 
            super();
1331
 
 
1332
1323
            final int n = blockSize100k * BZip2Constants.BASEBLOCKSIZE;
1333
1324
            this.block = new byte[(n + 1 + NUM_OVERSHOOT_BYTES)];
1334
1325
            this.fmap = new int[n];