private boolean initialiseNextBlock() throws IOException {

		/* If we're already at the end of the stream, do nothing */
		if (this.streamComplete) {
			return false;
		}

		/* If a block is complete, check the block CRC and integrate it into the stream CRC */
		if (this.blockDecompressor != null) {
			int blockCRC = this.blockDecompressor.checkCRC();
			this.streamCRC = ((this.streamCRC << 1) | (this.streamCRC >>> 31)) ^ blockCRC;
		}

		/* Read block-header or end-of-stream marker */
		final int marker1 = this.bitInputStream.readBits (24);
		final int marker2 = this.bitInputStream.readBits (24);

		if (marker1 == BZip2Constants.BLOCK_HEADER_MARKER_1 && marker2 == BZip2Constants.BLOCK_HEADER_MARKER_2) {
			// Initialise a new block
			try {
				this.blockDecompressor = new BZip2BlockDecompressor (this.bitInputStream, this.streamBlockSize);
			} catch (IOException e) {
				// If the block could not be decoded, stop trying to read more data
				this.streamComplete = true;
				throw e;
			}
			return true;
		} else if (marker1 == BZip2Constants.STREAM_END_MARKER_1 && marker2 == BZip2Constants.STREAM_END_MARKER_2) {
			// Read and verify the end-of-stream CRC
			this.streamComplete = true;
			final int storedCombinedCRC = this.bitInputStream.readInteger();
			if (storedCombinedCRC != this.streamCRC) {
				throw new BZip2Exception ("BZip2 stream CRC error");
			}
			return false;
		}

		/* If what was read is not a valid block-header or end-of-stream marker, the stream is broken */
		this.streamComplete = true;
		throw new BZip2Exception ("BZip2 stream format error");

	}