// Write the XAppRegistryItem object as an XML stream to this new file
ContentResource resource = (ContentResource)appNode;
ByteArrayOutputStream os = new ByteArrayOutputStream();
Writer w = new OutputStreamWriter(os);
XAppRegistryItem item = new XAppRegistryItem(appName, command);
item.encode(w);
byte b[] = os.toByteArray();
resource.put(b);
// Tell the config connection that we have added a new X11 App, if
// the config connection exists (it should)