public function readShufflingState()
    {
        try {
            $responseIdentifier = $this->readIdentifier();
            $shufflingGroupCount = $this->readTinyInt();
            
            $shufflingGroups = new ShufflingGroupCollection();
            
            for ($i = 0; $i < $shufflingGroupCount; $i++) {
                $shufflingGroups[] = $this->readShufflingGroup();
            }
            
            return new Shuffling($responseIdentifier, $shufflingGroups);
        } catch (BinaryStreamAccessException $e) {
            $msg = "An error occured while reading a shufflingState.";
            throw new QtiBinaryStreamAccessException($msg, $this, QtiBinaryStreamAccessException::SHUFFLING_STATE);
        }
    }