text: public void serialize(LittleEndianOutput out) {String username = getUsername();boolean is16bit = StringUtil.hasMultibyte(username);out.writeShort(username.length());out.writeByte(is16bit ? 0x01 : 0x00);if (is16bit) {StringUtil.putUnicodeLE(username, out);} else {StringUtil.putCompressedUnicode(username, out);}int encodedByteCount = 3 + username.length() * (is16bit ? 2 : 1);int paddingSize = DATA_SIZE - encodedByteCount;out.write(PADDING, 0, paddingSize);}