text: public BytesRef encode(char[] buffer, int offset, int length) {int payload = ArrayUtil.parseInt(buffer, offset, length);byte[] bytes = PayloadHelper.encodeInt(payload);BytesRef result = new BytesRef(bytes);return result;}