// This XPersistObject has a property called 'String'
propObjWrite.setPropertyValue("String", "XObjectOutputStream");
log.println("Writing object with label 'XObjectOutputStream'");
oObj.writeObject(objWrite);
XPersistObject readObj = oInStream.readObject();
XPropertySet propSet = (XPropertySet)
UnoRuntime.queryInterface(XPropertySet.class, readObj);
String label = (String)propSet.getPropertyValue("String");
log.println("Object with label '" + label + "' was read");