Zend/Gdata/MediaMimeStream.php
public function read($bytesRequested)
    {
        if($this->_currentPart >= count($this->_parts)) {
          return FALSE;
        }

        $activePart = $this->_parts[$this->_currentPart];
        $buffer = $activePart->read($bytesRequested);

        while(strlen($buffer) < $bytesRequested) {
          $this->_currentPart += 1;
          $nextBuffer = $this->read($bytesRequested - strlen($buffer));
          if($nextBuffer === FALSE) {
            break;
          }
          $buffer .= $nextBuffer;
        }

        return $buffer;
    }
public function read($bytesRequested)
    {
        if($this->_currentPart >= count($this->_parts)) {
          return FALSE;
        }

        $activePart = $this->_parts[$this->_currentPart];
        $buffer = $activePart->read($bytesRequested);

        while(strlen($buffer) < $bytesRequested) {
          $this->_currentPart += 1;
          $nextBuffer = $this->read($bytesRequested - strlen($buffer));
          if($nextBuffer === FALSE) {
            break;
          }
          $buffer .= $nextBuffer;
        }

        return $buffer;
    }
public function read ( $ bytesRequested ) { if ( $ this -> _currentPart >= count ( $ this -> _parts ) ) { return FALSE ; } $ activePart = $ this -> _parts [ $ this -> _currentPart ] ; $ buffer = $ activePart -> read ( $ bytesRequested ) ; while ( strlen ( $ buffer ) < $ bytesRequested ) { $ this -> _currentPart += 1 ; $ nextBuffer = $ this -> read ( $ bytesRequested - strlen ( $ buffer ) ) ; if ( $ nextBuffer === FALSE ) { break ; } $ buffer .= $ nextBuffer ; } return $ buffer ; }
Read a specific chunk of the the MIME multipart message.

@param integer $bufferSize The size of the chunk that is to be read,
must be lower than MAX_BUFFER_SIZE.
@return string A corresponding piece of the message. This could be
binary or regular text.
Read a specific chunk of the the MIME multipart message .