function stream(&$fp, $hdrs=array())
    {
        list($status, $reason) = 
                $this->container->cfs_http->get_object_to_stream($this,$fp,$hdrs);
        #if ($status == 401 && $this->_re_auth()) {
        #    return $this->stream($fp, $hdrs);
        #}
        if (($status < 200) || ($status > 299
                && $status != 412 && $status != 304)) {
            throw new InvalidResponseException("Invalid response (".$status."): "
                .$reason);
        }
        return True;
    }
function stream(&$fp, $hdrs=array())
    {
        list($status, $reason) = 
                $this->container->cfs_http->get_object_to_stream($this,$fp,$hdrs);
        #if ($status == 401 && $this->_re_auth()) {
        #    return $this->stream($fp, $hdrs);
        #}
        if (($status < 200) || ($status > 299
                && $status != 412 && $status != 304)) {
            throw new InvalidResponseException("Invalid response (".$status."): "
                .$reason);
        }
        return True;
    }
function stream ( & $ fp , $ hdrs = array ( ) ) { list ( $ status , $ reason ) = $ this -> container -> cfs_http -> get_object_to_stream ( $ this , $ fp , $ hdrs ) ; #if ($status == 401 && $this->_re_auth()) { #    return $this->stream($fp, $hdrs); #} if ( ( $ status < 200 ) || ( $ status > 299 && $ status != 412 && $ status != 304 ) ) { throw new InvalidResponseException ( "Invalid response (" . $ status . "): " . $ reason ) ; } return True ; }
Streaming read of Object's data

Given an open PHP resource (see PHP's fopen() method), fetch the Object's
data and write it to the open resource handle.  This is useful for
streaming an Object's content to the browser (videos, images) or for
fetching content to a local file.

Pass in $hdrs array to set specific custom HTTP headers such as
If-Match, If-None-Match, If-Modified-Since, Range, etc.

Example:
<code>
# ... authentication/connection/container code excluded
# ... see previous examples

# Assuming this is a web script to display the README to the
# user's browser:
#
<?php
// grab README from storage system
//
$my_docs = $conn->get_container("documents");
$doc = $my_docs->get_object("README");

// Hand it back to user's browser with appropriate content-type
//
header("Content-Type: " . $doc->content_type);
$output = fopen("php://output", "w");
$doc->stream($output); # stream object content to PHP's output buffer
fclose($output);
?>

# See read() above for a more simple example.
#
</code>

@param resource $fp open resource for writing data to
@param array $hdrs user-defined headers (Range, If-Match, etc.)
@return string Object's data
@throws InvalidResponseException unexpected response
Streaming read of Object s data