else if (encoding.equals("utf16")) {
short[] buffer = new short[str.length()];
for (int i = 0; i < str.length(); i++)
buffer[i] = (short)str.charAt(i);
if (res instanceof VMArrayInstance_i16) {
VMArrayInstance_i16 arr = (VMArrayInstance_i16)res;
arr.elems = buffer.length;
arr.start = 0;
arr.slots = buffer;
}
else {