Apache Commons logo Commons Compress

CPD Results

The following document contains the results of PMD's CPD 5.6.1.

Duplications

File Line
org/apache/commons/compress/compressors/brotli/BrotliCompressorInputStream.java 42
org/apache/commons/compress/compressors/zstandard/ZstdCompressorInputStream.java 43
        decIS = new BrotliInputStream(countingStream = new CountingInputStream(in));
    }

    @Override
    public int available() throws IOException {
        return decIS.available();
    }

    @Override
    public void close() throws IOException {
        decIS.close();
    }

    @Override
    public int read(final byte[] b) throws IOException {
        return decIS.read(b);
    }

    @Override
    public long skip(final long n) throws IOException {
        return IOUtils.skip(decIS, n);
    }

    @Override
    public void mark(final int readlimit) {
        decIS.mark(readlimit);
    }

    @Override
    public boolean markSupported() {
        return decIS.markSupported();
    }

    @Override
    public int read() throws IOException {
        final int ret = decIS.read();
        count(ret == -1 ? 0 : 1);
        return ret;
    }

    @Override
    public int read(final byte[] buf, final int off, final int len) throws IOException {
        final int ret = decIS.read(buf, off, len);
        count(ret);
        return ret;
    }

    @Override
    public String toString() {
        return decIS.toString();
    }

    @Override
    public void reset() throws IOException {
        decIS.reset();
    }

    /**
     * @since 1.17
     */
    @Override
    public long getCompressedCount() {
        return countingStream.getBytesRead();
    }
}