public function pipe($stream)
    {
        $offset = $stream->tell();
        $result = stream_copy_to_stream($this->resource(), $stream->resource());
        if ($stream->isSeekable()) {
            $stream->seek($offset);
        }
        return $result;
    }
public function pipe($stream)
    {
        $offset = $stream->tell();
        $result = stream_copy_to_stream($this->resource(), $stream->resource());
        if ($stream->isSeekable()) {
            $stream->seek($offset);
        }
        return $result;
    }
public function pipe ( $ stream ) { $ offset = $ stream -> tell ( ) ; $ result = stream_copy_to_stream ( $ this -> resource ( ) , $ stream -> resource ( ) ) ; if ( $ stream -> isSeekable ( ) ) { $ stream -> seek ( $ offset ) ; } return $ result ; }
Read the content of this stream and write it to another stream.

@param  instance $stream The destination stream to write to
@return integer          The number of copied bytes
Read the content of this stream and write it to another stream .