protected function _bufferSize($length)
    {
        if ($this->_limit !== null) {
            $position = $this->tell();
            $max = $this->_start + $this->_limit;
            $length = $max - $position;
        }
        if ($length === null) {
            $length = $this->_bufferSize;
        }
        return $length;
    }
protected function _bufferSize($length)
    {
        if ($this->_limit !== null) {
            $position = $this->tell();
            $max = $this->_start + $this->_limit;
            $length = $max - $position;
        }
        if ($length === null) {
            $length = $this->_bufferSize;
        }
        return $length;
    }
protected function _bufferSize ( $ length ) { if ( $ this -> _limit !== null ) { $ position = $ this -> tell ( ) ; $ max = $ this -> _start + $ this -> _limit ; $ length = $ max - $ position ; } if ( $ length === null ) { $ length = $ this -> _bufferSize ; } return $ length ; }
Determine the buffer size to read.

@param  integer $length Maximum number of bytes to read (default to buffer size).
@return integer         The allowed size.
Determine the buffer size to read .