public char[] toCharArray() { int l = currentString.length(); char[] buffer = new char[l]; currentString.getChars(0, l, buffer, 0); return buffer; }