public function writeClosingTag($newline = true)
    {
        try {
            if ($newline === true) {
                $this->writeNewline();
            }
            $this->getStream()->write('?>');
        } catch (Exception $e) {
            $msg = "An error occured while writing a PHP closing tag (?>).";
            throw new StreamAccessException($msg, $this, 0, $e);
        }
    }