protected function loadBuffer()
	{
		$this->buffer = '';
	
		if($this->finished)
		{
			return;
		}
		
		while(!$this->stream->eof() && strlen($this->buffer) < $this->chunkSize)
		{
			$this->buffer .= $this->stream->read($this->chunkSize - strlen($this->buffer));
		}
		
		if($this->buffer === '')
		{
			$this->finished = true;
			$this->buffer .= "0\r\n\r\n";
		}
		else
		{
			$this->buffer = sprintf("%X\r\n%s\r\n", strlen($this->buffer), $this->buffer);
		}
	}
protected function loadBuffer()
	{
		$this->buffer = '';
	
		if($this->finished)
		{
			return;
		}
		
		while(!$this->stream->eof() && strlen($this->buffer) < $this->chunkSize)
		{
			$this->buffer .= $this->stream->read($this->chunkSize - strlen($this->buffer));
		}
		
		if($this->buffer === '')
		{
			$this->finished = true;
			$this->buffer .= "0\r\n\r\n";
		}
		else
		{
			$this->buffer = sprintf("%X\r\n%s\r\n", strlen($this->buffer), $this->buffer);
		}
	}
protected function loadBuffer ( ) { $ this -> buffer = '' ; if ( $ this -> finished ) { return ; } while ( ! $ this -> stream -> eof ( ) && strlen ( $ this -> buffer ) < $ this -> chunkSize ) { $ this -> buffer .= $ this -> stream -> read ( $ this -> chunkSize - strlen ( $ this -> buffer ) ) ; } if ( $ this -> buffer === '' ) { $ this -> finished = true ; $ this -> buffer .= "0\r\n\r\n" ; } else { $ this -> buffer = sprintf ( "%X\r\n%s\r\n" , strlen ( $ this -> buffer ) , $ this -> buffer ) ; } }
Read data from the underlying input stream into the read buffer.
Read data from the underlying input stream into the read buffer .