public char[] toCharArray() {synchronized (lock) {char[] result = new char[count];System.arraycopy(buf, 0, result, 0, count);return result;}}

public virtual char[] toCharArray(){lock (@lock){char[] result = new char[count];System.Array.Copy(buf, 0, result, 0, count);return result;}}
