code/libraries/joomlatools/library/filesystem/stream/abstract.php
public function toString()
    {
        $result = '';

        if ($this->isReadable() && $this->isSeekable())
        {
            $position = $this->peek();

            $this->seek(0);
            $result = stream_get_contents($this->_resource);
            $this->seek($position);
        }

        return $result;
    }
public function toString()
    {
        $result = '';

        if ($this->isReadable() && $this->isSeekable())
        {
            $position = $this->peek();

            $this->seek(0);
            $result = stream_get_contents($this->_resource);
            $this->seek($position);
        }

        return $result;
    }
public function toString ( ) { $ result = '' ; if ( $ this -> isReadable ( ) && $ this -> isSeekable ( ) ) { $ position = $ this -> peek ( ) ; $ this -> seek ( 0 ) ; $ result = stream_get_contents ( $ this -> _resource ) ; $ this -> seek ( $ position ) ; } return $ result ; }
Reads all data from the stream into a string, from the beginning to end.

This method MUST attempt to seek to the beginning of the stream before reading data and read the stream until
the end is reached. The file pointer should stay at it's original position.

Warning: This could attempt to load a large amount of data into memory.

@return string
Reads all data from the stream into a string from the beginning to end .