public static PyTuple utf_16_ex_decode(String str, String errors, int byteorder,
boolean final_) {
int[] bo = new int[] { 0 };
int[] consumed = final_ ? null : new int[1];
String decoded = decode_UTF16(str, errors, bo, consumed);
return new PyTuple(Py.newString(decoded),
Py.newInteger(final_ ? str.length() : consumed[0]),
Py.newInteger(bo[0]));
}