private function parseFragments(PrecursorIon $precursor)
    {
        $line = trim($this->getLine());

        if (strlen($line) == 0) {
            return;
        }

        $pair = preg_split('/\\s/', $line, 3);

        $ion = new FragmentIon();
        $fragmentMz = (float) $pair[0];
        $fragmentCharge = 1;
        
        if (count($pair) > 1) {
            $ion->setIntensity((float) $pair[1]);
        }

        if (count($pair) > 2) {
            $fragmentCharge = (int) $pair[2];
        }

        $ion->setMonoisotopicMassCharge($fragmentMz, $fragmentCharge);

        $precursor->addFragmentIon($ion);
    }