final int filteringRealizationBits = din.readUnsignedByte();
final NATFeatureRealization filteringRealization = NATFeatureRealization.fromEncoded(filteringRealizationBits);
if (null == mappingFeature || !mappingFeature.equals(NATFeature.MAPPING) || null == filteringFeature
|| !filteringFeature.equals(NATFeature.FILTERING)) {
throw new MessageFormatException("Could not encode the NAT feature attributes."); //$NON-NLS-1$
}
if (null == mappingRealization || null == filteringRealization) {
throw new MessageFormatException("Could not get the realization of a NAT feature"); //$NON-NLS-1$
}
return new NATBehavior(mappingRealization, filteringRealization);
}