public virtual char[] GetSuffix(int len) { char[] array = new char[len]; if (this.bufpos + 1 >= len) { ByteCodeHelper.arraycopy_primitive_2(this.buffer, this.bufpos - len + 1, array, 0, len); } else { ByteCodeHelper.arraycopy_primitive_2(this.buffer, this.bufsize - (len - this.bufpos - 1), array, 0, len - this.bufpos - 1); ByteCodeHelper.arraycopy_primitive_2(this.buffer, 0, array, len - this.bufpos - 1, this.bufpos + 1); } return(array); }
protected internal virtual void ExpandBuff(bool wrapAround) { char[] array = new char[this.bufsize + 2048]; int[] array2 = new int[this.bufsize + 2048]; int[] array3 = new int[this.bufsize + 2048]; try { if (wrapAround) { ByteCodeHelper.arraycopy_primitive_2(this.buffer, this.tokenBegin, array, 0, this.bufsize - this.tokenBegin); ByteCodeHelper.arraycopy_primitive_2(this.buffer, 0, array, this.bufsize - this.tokenBegin, this.bufpos); this.buffer = array; ByteCodeHelper.arraycopy_primitive_4(this.bufline, this.tokenBegin, array2, 0, this.bufsize - this.tokenBegin); ByteCodeHelper.arraycopy_primitive_4(this.bufline, 0, array2, this.bufsize - this.tokenBegin, this.bufpos); this.bufline = array2; ByteCodeHelper.arraycopy_primitive_4(this.bufcolumn, this.tokenBegin, array3, 0, this.bufsize - this.tokenBegin); ByteCodeHelper.arraycopy_primitive_4(this.bufcolumn, 0, array3, this.bufsize - this.tokenBegin, this.bufpos); this.bufcolumn = array3; this.bufpos += this.bufsize - this.tokenBegin; } else { ByteCodeHelper.arraycopy_primitive_2(this.buffer, this.tokenBegin, array, 0, this.bufsize - this.tokenBegin); this.buffer = array; ByteCodeHelper.arraycopy_primitive_4(this.bufline, this.tokenBegin, array2, 0, this.bufsize - this.tokenBegin); this.bufline = array2; ByteCodeHelper.arraycopy_primitive_4(this.bufcolumn, this.tokenBegin, array3, 0, this.bufsize - this.tokenBegin); this.bufcolumn = array3; this.bufpos -= this.tokenBegin; } } catch (System.Exception ex) { throw new Error(Throwable.instancehelper_getMessage(ex), ex); } int num = this.bufsize + 2048; int num2 = num; this.bufsize = num; this.available = num2; this.tokenBegin = 0; }