public function writeDirectedPair(QtiDirectedPair $directedPair)
    {
        try {
            $this->writeString($directedPair->getFirst());
            $this->writeString($directedPair->getSecond());
        } catch (BinaryStreamAccessException $e) {
            $msg = "An error occured while writing a directedPair.";
            throw new QtiBinaryStreamAccessException($msg, $this, QtiBinaryStreamAccessException::DIRECTEDPAIR, $e);
        }
    }
public function writeDirectedPair(QtiDirectedPair $directedPair)
    {
        try {
            $this->writeString($directedPair->getFirst());
            $this->writeString($directedPair->getSecond());
        } catch (BinaryStreamAccessException $e) {
            $msg = "An error occured while writing a directedPair.";
            throw new QtiBinaryStreamAccessException($msg, $this, QtiBinaryStreamAccessException::DIRECTEDPAIR, $e);
        }
    }
public function writeDirectedPair ( QtiDirectedPair $ directedPair ) { try { $ this -> writeString ( $ directedPair -> getFirst ( ) ) ; $ this -> writeString ( $ directedPair -> getSecond ( ) ) ; } catch ( BinaryStreamAccessException $ e ) { $ msg = "An error occured while writing a directedPair." ; throw new QtiBinaryStreamAccessException ( $ msg , $ this , QtiBinaryStreamAccessException :: DIRECTEDPAIR , $ e ) ; } }
Write a DirectedPair in the current binary stream.

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