//-----------------------------------------------------------------------
            // Class constructors
            //-----------------------------------------------------------------------

            /// <summary>Initializes a new instance of the <see cref="UserProfile"/> class.</summary>
            /// <param name="binaryData">Byte stream input</param>
            internal UserProfile(byte[] binaryData)
            {
                // Check whether the table is at least 712B long (V7R2 minimum)
                if (binaryData.Length < 712)
                {
                    throw new System.InvalidOperationException("The received user data is too short for USRI0300 format.");
                }

                // Check whether the returned bytes value makes sense
                if (Converters.BigEndianToUInt32(binaryData) > binaryData.Length)
                {
                    throw new System.InvalidOperationException("The received data length is bigger than the buffer size. Exiting.");
                }

                this.UserName               = Converters.EbcdicToAsciiString(binaryData, 8, 10).ToUpper().Trim();
                this.AccountingCode         = Converters.EbcdicToAsciiString(binaryData, 309, 15).ToUpper().Trim();
                this.LastPasswordChangeDate = Converters.DTSTimeStampToDateTime(binaryData, 46);
                this.PasswordExpirationDate = Converters.DTSTimeStampToDateTime(binaryData, 60);
                this.UserExpirationDate     = Converters.DTSTimeStampToDateTime(binaryData, 676);
                this.Status              = Converters.EbcdicToAsciiString(binaryData, 36, 10).ToUpper().Trim();
                this.LastSignonDateTime  = Converters.TimestampToDateTime(Converters.EbcdicToAsciiString(binaryData, 18, 13).ToUpper().Trim());
                this.BlockPasswordChange = Converters.EbcdicToAsciiString(binaryData, 661, 10).ToUpper().Trim();
                this.Owner          = Converters.EbcdicToAsciiString(binaryData, 108, 10).ToUpper().Trim();
                this.UserClass      = Converters.EbcdicToAsciiString(binaryData, 73, 10).ToUpper().Trim();
                this.GroupAuthority = Converters.EbcdicToAsciiString(binaryData, 118, 10).ToUpper().Trim();
                this.GroupProfile   = Converters.EbcdicToAsciiString(binaryData, 98, 10).ToUpper().Trim();
                string specialAuthorities = Converters.EbcdicToAsciiString(binaryData, 83, 15).ToUpper().PadRight(8);

                this.SpecialAuthorities = (specialAuthorities[0] == '1' ? "*ALLOBJ " : "") +
                                          (specialAuthorities[1] == '1' ? "*SECADM " : "") +
                                          (specialAuthorities[2] == '1' ? "*JOBCTL " : "") +
                                          (specialAuthorities[3] == '1' ? "*SPLCTL " : "") +
                                          (specialAuthorities[4] == '1' ? "*SAVSYS " : "") +
                                          (specialAuthorities[5] == '1' ? "*SERVICE " : "") +
                                          (specialAuthorities[6] == '1' ? "*AUDIT " : "") +
                                          (specialAuthorities[7] == '1' ? "*IOSYSCFG" : "");

                this.PasswordExpirationInterval = Converters.BigEndianToUInt32(binaryData, 56);
                this.PasswordExpirationDays     = Converters.BigEndianToUInt32(binaryData, 68);
                this.LastPasswordChangeDate     = Converters.DTSTimeStampToDateTime(binaryData, 46);
                this.PasswordExpirationDate     = Converters.DTSTimeStampToDateTime(binaryData, 60);
                //TODO: Implementation of other fields
            }