public int stringParamUTF16(CharSequence value, boolean nullTerminated) {
        if (value == null) {
            return -1;
        }

        int offset = bufferParam((value.length() + (nullTerminated ? 1 : 0)) << 1);
        MemoryUtil.memUTF16(value, nullTerminated, buffer, offset);
        return offset;
    }
Ensures space for the specified string encoded in UTF-16, encodes the
string at the allocated offset and returns that offset.
jme3-lwjgl3/src/main/java/com/jme3/lwjgl3/utils/APIBuffer.java