/** * Set the IStream object to be read. * * @param \qtism\common\storage\IStream $stream An IStream object. * @throws \qtism\common\storage\StreamAccessException If the $stream is not open yet. */ protected function setStream(IStream $stream) { if ($stream->isOpen() === false) { $msg = "A BinaryStreamAccess do not accept closed streams to be read."; throw new BinaryStreamAccessException($msg, $this, StreamAccessException::NOT_OPEN); } parent::setStream($stream); }