public function writePair(QtiPair $pair)
    {
        try {
            $this->writeString($pair->getFirst());
            $this->writeString($pair->getSecond());
        } catch (BinaryStreamAccessException $e) {
            $msg = "An error occured while writing a pair.";
            throw new QtiBinaryStreamAccessException($msg, $this, QtiBinaryStreamAccessException::PAIR, $e);
        }
    }
public function writePair(QtiPair $pair)
    {
        try {
            $this->writeString($pair->getFirst());
            $this->writeString($pair->getSecond());
        } catch (BinaryStreamAccessException $e) {
            $msg = "An error occured while writing a pair.";
            throw new QtiBinaryStreamAccessException($msg, $this, QtiBinaryStreamAccessException::PAIR, $e);
        }
    }
public function writePair ( QtiPair $ pair ) { try { $ this -> writeString ( $ pair -> getFirst ( ) ) ; $ this -> writeString ( $ pair -> getSecond ( ) ) ; } catch ( BinaryStreamAccessException $ e ) { $ msg = "An error occured while writing a pair." ; throw new QtiBinaryStreamAccessException ( $ msg , $ this , QtiBinaryStreamAccessException :: PAIR , $ e ) ; } }
Write a Pair in the current binary stream.

@param \qtism\common\datatypes\Pair $pair A Pair object.
@throws \qtism\runtime\storage\binary\QtiBinaryStreamAccessException
Write a Pair in the current binary stream .