90 while ( !$leave && !$this->mSource->atEnd() &&
91 strlen( $this->mBuffer ) < $count
93 $read = $this->mSource->readChunk();
95 if ( !strlen( $read ) ) {
99 $this->mBuffer .= $read;
102 if ( strlen( $this->mBuffer ) ) {
103 $return = substr( $this->mBuffer, 0, $count );
104 $this->mBuffer = substr( $this->mBuffer, $count );
107 $this->mPosition += strlen( $return );