code: public static String writeUserDataAsString(
  			Map<String,String> messagingConfiguration,
  			String domain,
  			String applicationName,
  			String scopedInstancePath )
  	throws IOException {
  
  		Properties props = writeUserDataAsProperties( messagingConfiguration, domain, applicationName, scopedInstancePath );
  		StringWriter writer = new StringWriter();
  		props.store( writer, "" );
  
  		return writer.toString();
  	}
docs: Writes user data as a string.
  <p>
  If file contents should be sent as well, use {@link #ENCODE_FILE_CONTENT_PREFIX}.
  </p>
  
  @param domain the domain (used among other things in the messaging)
  @param messagingConfiguration the messaging configuration
  @param applicationName the application name
  @param scopedInstancePath the scoped instance's path (the instance associated with the agent)
  @return a non-null string
  @throws IOException if something went wrong