code: protected String buildSnapshotProps(Map<String, String> props) {
          Properties snapshotProperties = new Properties();
          for (String key : props.keySet()) {
              snapshotProperties.setProperty(key, props.get(key));
          }
  
          StringWriter writer = new StringWriter();
          try {
              snapshotProperties.store(writer, null);
          } catch (IOException e) {
              throw new TaskException("Could not write snapshot properties: " +
                                      e.getMessage(), e);
          }
          writer.flush();
          return writer.toString();
      }
docs: Constructs the contents of a properties file given a set of
  key/value pairs
  
  @param props snapshot properties
  @return Properties-file formatted key/value pairs