public WriteAccessRecord(RecordInputStream in) {if (in.remaining() > DATA_SIZE) {throw new RecordFormatException("Expected data size (" + DATA_SIZE + ") but got ("+ in.remaining() + ")");}int nChars = in.readUShort();int is16BitFlag = in.readUByte();if (nChars > DATA_SIZE || (is16BitFlag & 0xFE) != 0) {byte[] data = new byte[3 + in.remaining()];LittleEndian.putUShort(data, 0, nChars);LittleEndian.putByte(data, 2, is16BitFlag);in.readFully(data, 3, data.length-3);String rawValue = new String(data, StringUtil.UTF8);setUsername(rawValue.trim());return;}String rawText;if ((is16BitFlag & 0x01) == 0x00) {rawText = StringUtil.readCompressedUnicode(in, nChars);} else {rawText = StringUtil.readUnicodeLE(in, nChars);}field_1_username = rawText.trim();int padSize = in.remaining();while (padSize > 0) {in.readUByte();padSize--;}}

public WriteAccessRecord(RecordInputStream in1){if (in1.Remaining > DATA_SIZE){throw new RecordFormatException("Expected data size (" + DATA_SIZE + ") but got ("+ in1.Remaining + ")");}int nChars = in1.ReadUShort();int is16BitFlag = in1.ReadUByte();if (nChars > DATA_SIZE || (is16BitFlag & 0xFE) != 0){byte[] data = new byte[3 + in1.Remaining];LittleEndian.PutUShort(data, 0, nChars);LittleEndian.PutByte(data, 2, is16BitFlag);in1.ReadFully(data, 3, data.Length - 3);char[] data1=new char[data.Length];for (int i = 0; i < data.Length; i++){data1[i] = (char)data[i];}String rawValue = new String(data1);Username = rawValue.Trim();return;}String rawText;if ((is16BitFlag & 0x01) == 0x00){rawText = StringUtil.ReadCompressedUnicode(in1, nChars);}else{rawText = StringUtil.ReadUnicodeLE(in1, nChars);}field_1_username = rawText.Trim();int padSize = in1.Remaining;while (padSize > 0){in1.ReadUByte();padSize--;}}
