//can only have one prefix value and a subnet string
if((s.length < 1) || (s.length > 2) )
{
Message message =
ERR_ADDRESSMASK_FORMAT_DECODE_ERROR.get();
throw new ConfigException(message);
}
else if(s.length == 2)
{
//can't have wildcard with a prefix
if(s[0].indexOf('*') > -1)
{
Message message =
ERR_ADDRESSMASK_WILDCARD_DECODE_ERROR.get();
throw new ConfigException(message);
}
prefix = Integer.parseInt(s[1]);
}
//must be between 0-maxprefix
if((prefix < 0) || (prefix > maxPrefix))
{
Message message =
ERR_ADDRESSMASK_PREFIX_DECODE_ERROR.get();
throw new ConfigException(message);
}
}
catch(NumberFormatException nfex)
{
Message msg = ERR_ADDRESSMASK_FORMAT_DECODE_ERROR.get();
throw new ConfigException(msg);
}
return prefix;
}