public function writeBoolean($boolean)
    {
        try {
            $val = ($boolean === true) ? 1 : 0;
            $this->getStream()->write(chr($val));
        } catch (StreamException $e) {
            $this->handleStreamException($e, BinaryStreamAccessException::FLOAT, false);
        }
    }