Lines Matching refs:length
78 * <code>offset</code>, and <code>length</code> fields directly.
129 this(s.length());
134 public XMLStringBuffer(char[] ch, int offset, int length) {
135 this(length);
136 append(ch, offset, length);
141 this(s.length);
152 length = 0;
161 if(this.length + 1 > this.ch.length){
162 int newLength = this.ch.length * 2 ;
163 if(newLength < this.ch.length + DEFAULT_SIZE){
164 newLength = this.ch.length + DEFAULT_SIZE;
167 System.arraycopy(this.ch, 0, tmp, 0, this.length);
170 this.ch[this.length] = c ;
171 this.length++;
180 int length = s.length();
181 if (this.length + length > this.ch.length) {
182 int newLength = this.ch.length * 2 ;
183 if(newLength < this.ch.length + length + DEFAULT_SIZE){
184 newLength = this.ch.length + length+ DEFAULT_SIZE;
188 System.arraycopy(this.ch, 0, newch, 0, this.length);
191 s.getChars(0, length, this.ch, this.length);
192 this.length += length;
200 * @param length
202 public void append(char[] ch, int offset, int length) {
203 if (this.length + length > this.ch.length) {
204 int newLength = this.ch.length * 2 ;
205 if(newLength < this.ch.length + length + DEFAULT_SIZE){
206 newLength = this.ch.length + length + DEFAULT_SIZE;
209 System.arraycopy(this.ch, 0, newch, 0, this.length);
212 //making the code more robust as it would handle null or 0 length data,
214 if(ch != null && length > 0){
215 System.arraycopy(ch, offset, this.ch, this.length, length);
216 this.length += length;
226 append(s.ch, s.offset, s.length);