public void append(char ch) { int newlen = this.len + 1; if (newlen > this.buffer.length) { expand(newlen); } this.buffer[this.len] = ch; this.len = newlen; }
public void ensureCapacity(int required) { int available = this.buffer.length - this.len; if (required > available) { expand(this.len + required); } }
public void append(String str) { if (str == null) { str = "null"; } int strlen = str.length(); int newlen = this.len + strlen; if (newlen > this.buffer.length) { expand(newlen); } str.getChars(0, strlen, this.buffer, this.len); this.len = newlen; }
public void append(final byte[] b, int off, int len) { if (b == null) { return; } if ((off < 0) || (off > b.length) || (len < 0) || ((off + len) < 0) || ((off + len) > b.length)) { throw new IndexOutOfBoundsException(); } if (len == 0) { return; } int oldlen = this.len; int newlen = oldlen + len; if (newlen > this.buffer.length) { expand(newlen); } for (int i1 = off, i2 = oldlen; i2 < newlen; i1++, i2++) { int ch = b[i1]; if (ch < 0) { ch = 256 + ch; } this.buffer[i2] = (char) ch; } this.len = newlen; }
public void append(final char[] b, int off, int len) { if (b == null) { return; } if ((off < 0) || (off > b.length) || (len < 0) || ((off + len) < 0) || ((off + len) > b.length)) { throw new IndexOutOfBoundsException(); } if (len == 0) { return; } int newlen = this.len + len; if (newlen > this.buffer.length) { expand(newlen); } System.arraycopy(b, off, this.buffer, this.len, len); this.len = newlen; }
public void ensureCapacity(int required) { int available = this.buffer.length - this.len; if (required > available) { expand(this.len + required); } }
public void append(char ch) { int newlen = this.len + 1; if (newlen > this.buffer.length) { expand(newlen); } this.buffer[this.len] = ch; this.len = newlen; }
public void append(char ch) { int newlen = this.len + 1; if (newlen > this.buffer.length) { expand(newlen); } this.buffer[this.len] = ch; this.len = newlen; }
public void append(char ch) { int newlen = this.len + 1; if (newlen > this.buffer.length) { expand(newlen); } this.buffer[this.len] = ch; this.len = newlen; }
public void ensureCapacity(int required) { int available = this.buffer.length - this.len; if (required > available) { expand(this.len + required); } }
public void ensureCapacity(int required) { int available = this.buffer.length - this.len; if (required > available) { expand(this.len + required); } }
/** * Appends {@code ch} char to this buffer. The capacity of the buffer * is increased, if necessary, to accommodate the additional char. * * @param ch the char to be appended. */ public void append(final char ch) { final int newlen = this.len + 1; if (newlen > this.buffer.length) { expand(newlen); } this.buffer[this.len] = ch; this.len = newlen; }
public void ensureCapacity(int required) { int available = this.buffer.length - this.len; if (required > available) { expand(this.len + required); } }
/** * Appends {@code ch} char to this buffer. The capacity of the buffer * is increased, if necessary, to accommodate the additional char. * * @param ch the char to be appended. */ public void append(final char ch) { final int newlen = this.len + 1; if (newlen > this.buffer.length) { expand(newlen); } this.buffer[this.len] = ch; this.len = newlen; }
public void append(char ch) { int newlen = this.len + 1; if (newlen > this.buffer.length) { expand(newlen); } this.buffer[this.len] = ch; this.len = newlen; }
/** * Appends {@code ch} char to this buffer. The capacity of the buffer * is increased, if necessary, to accommodate the additional char. * * @param ch the char to be appended. */ public void append(final char ch) { final int newlen = this.len + 1; if (newlen > this.buffer.length) { expand(newlen); } this.buffer[this.len] = ch; this.len = newlen; }
public void append(String str) { if (str == null) { str = "null"; } int strlen = str.length(); int newlen = this.len + strlen; if (newlen > this.buffer.length) { expand(newlen); } str.getChars(0, strlen, this.buffer, this.len); this.len = newlen; }
public void append(String str) { if (str == null) { str = "null"; } int strlen = str.length(); int newlen = this.len + strlen; if (newlen > this.buffer.length) { expand(newlen); } str.getChars(0, strlen, this.buffer, this.len); this.len = newlen; }
public void append(String str) { if (str == null) { str = "null"; } int strlen = str.length(); int newlen = this.len + strlen; if (newlen > this.buffer.length) { expand(newlen); } str.getChars(0, strlen, this.buffer, this.len); this.len = newlen; }
public void append(String str) { if (str == null) { str = "null"; } int strlen = str.length(); int newlen = this.len + strlen; if (newlen > this.buffer.length) { expand(newlen); } str.getChars(0, strlen, this.buffer, this.len); this.len = newlen; }