@Override
    public void deserialize(Buffer buf) {
        short flag1 = buf.readUByte();
        hasRights = BooleanByteWrapper.getFlag(flag1, 0);
        wasAlreadyConnected = BooleanByteWrapper.getFlag(flag1, 1);
        login = buf.readString();
        nickname = buf.readString();
        accountId = buf.readInt();
        if (accountId < 0)
            throw new RuntimeException("Forbidden value on accountId = " + accountId + ", it doesn't respect the following condition : accountId < 0");
        communityId = buf.readByte();
        if (communityId < 0)
            throw new RuntimeException("Forbidden value on communityId = " + communityId + ", it doesn't respect the following condition : communityId < 0");
        secretQuestion = buf.readString();
        subscriptionEndDate = buf.readDouble();
        if (subscriptionEndDate < 0)
            throw new RuntimeException("Forbidden value on subscriptionEndDate = " + subscriptionEndDate + ", it doesn't respect the following condition : subscriptionEndDate < 0");
        accountCreation = buf.readDouble();
        if (accountCreation < 0)
            throw new RuntimeException("Forbidden value on accountCreation = " + accountCreation + ", it doesn't respect the following condition : accountCreation < 0");
    }