private boolean complete() throws IOException { this.storedCombinedCRC = bsGetInt(bin); this.currentState = EOF; this.data = null; if (this.storedCombinedCRC != this.computedCombinedCRC) { throw new IOException("BZip2 CRC error"); } // Look for the next .bz2 stream if decompressing // concatenated files. return !decompressConcatenated || !init(false); }
/** * Constructs a new BZip2CompressorInputStream which decompresses bytes * read from the specified stream. * * @param in the InputStream from which this object should be created * @param decompressConcatenated * if true, decompress until the end of the input; * if false, stop after the first .bz2 stream and * leave the input position to point to the next * byte after the .bz2 stream * * @throws IOException * if {@code in == null}, the stream content is malformed, or an I/O error occurs. */ public BZip2CompressorInputStream(final InputStream in, final boolean decompressConcatenated) throws IOException { this.bin = new BitInputStream(in == System.in ? new CloseShieldFilterInputStream(in) : in, ByteOrder.BIG_ENDIAN); this.decompressConcatenated = decompressConcatenated; init(true); initBlock(); }
/** * Constructs a new BZip2CompressorInputStream which decompresses bytes * read from the specified stream. * * @param in the InputStream from which this object should be created * @param decompressConcatenated * if true, decompress until the end of the input; * if false, stop after the first .bz2 stream and * leave the input position to point to the next * byte after the .bz2 stream * * @throws IOException * if {@code in == null}, the stream content is malformed, or an I/O error occurs. */ public BZip2CompressorInputStream(final InputStream in, final boolean decompressConcatenated) throws IOException { this.bin = new BitInputStream(in == System.in ? new CloseShieldFilterInputStream(in) : in, ByteOrder.BIG_ENDIAN); this.decompressConcatenated = decompressConcatenated; init(true); initBlock(); }
private boolean complete() throws IOException { this.storedCombinedCRC = bsGetInt(bin); this.currentState = EOF; this.data = null; if (this.storedCombinedCRC != this.computedCombinedCRC) { throw new IOException("BZip2 CRC error"); } // Look for the next .bz2 stream if decompressing // concatenated files. return !decompressConcatenated || !init(false); }