code: private void prepareForEncoding() {
  		// remove MESSAGE-INTEGRITY and FINGERPRINT attributes so that we can
  		// make sure they are added at the end.
  		StunAttribute msgIntAttr = removeAttribute(StunAttribute.MESSAGE_INTEGRITY);
  		StunAttribute fingerprint = removeAttribute(StunAttribute.FINGERPRINT);
  
  		// add a SOFTWARE attribute if the user said so, and unless they did it
  		// themselves.
  		String software = System.getProperty("TelScale Media Server");
  
  		if (getAttribute(StunAttribute.SOFTWARE) == null && software != null && software.length() > 0) {
  			addAttribute(StunAttributeFactory.createSoftwareAttribute(software.getBytes()));
  		}
  
  		// re-add MESSAGE-INTEGRITY if there was one.
  		if (msgIntAttr != null) {
  			addAttribute(msgIntAttr);
  		}
  
  		// add FINGERPRINT if there was one or if user told us to add it
  		// everywhere.
  		if (fingerprint == null) {
  			fingerprint = StunAttributeFactory.createFingerprintAttribute();
  		}
  
  		if (fingerprint != null) {
  			addAttribute(fingerprint);
  		}
  	}
docs: Adds attributes that have been requested vis configuration properties.
  Asserts attribute order where necessary.