+
+ /**
+ * Serialization methods. The serialized form is the same as the
+ * string parsed by the constructor.
+ */
+
+ private void writeObject(ObjectOutputStream out)
+ throws IOException
+ {
+ out.defaultWriteObject();
+ StringBuffer buffer = new StringBuffer(getDomain());
+ buffer.append(':');
+ String properties = getKeyPropertyListString();
+ buffer.append(properties);
+ if (isPropertyPattern())
+ {
+ if (properties.length() == 0)
+ buffer.append("*");
+ else
+ buffer.append(",*");
+ }
+ out.writeObject(buffer.toString());
+ }
+
+ private void readObject(ObjectInputStream in)
+ throws IOException, ClassNotFoundException
+ {
+ in.defaultReadObject();
+ String objectName = (String)in.readObject();
+ try
+ {
+ parse(objectName);
+ }
+ catch (MalformedObjectNameException x)
+ {
+ throw new InvalidObjectException(x.toString());
+ }
+ }
+
+