public function eof()
    {
        if($this->getType() == 'memory') {
            $result = $this->_position >= $this->_length;
        } else {
            $result = parent::eof();
        }

        return $result;
    }