private void processSetSystemPropertiesCmd(DataInputStream params, IOTACommandHelper helper)
      throws IOException {
    int dataSize = helper.getDataInputStream().readInt();
    ByteArrayOutputStream baos = new ByteArrayOutputStream(dataSize);
    helper.receiveFile(dataSize, baos);
    Properties newPersistentProperties = new Properties();
    newPersistentProperties.load(new ByteArrayInputStream(baos.toByteArray()));

    Properties oldPersistentProperties = spot.getPersistentProperties();

    // store new properties in flash
    spot.storeProperties(newPersistentProperties);

    // remove deleted properties from current isolate
    Enumeration oldKeys = oldPersistentProperties.keys();
    while (oldKeys.hasMoreElements()) {
      String oldKey = (String) oldKeys.nextElement();
      if (!newPersistentProperties.containsKey(oldKey)) {
        VM.setProperty(oldKey, null);
      }
    }

    // store new and modified properties in current isolate
    Enumeration newKeys = newPersistentProperties.keys();
    while (newKeys.hasMoreElements()) {
      String newKey = (String) newKeys.nextElement();
      VM.setProperty(newKey, newPersistentProperties.getProperty(newKey));
    }

    helper.sendPrompt();
  }