out.writeObject(a.getAttribute(oldKey));
else { Object io = writeAttributeKeys.get(key); if (io == null) throw new NotSerializableException(key.getClass().getName() + ", key: " + key); out.writeObject(io); }  Object val = a.getAttribute(key); Object io = writeAttributeKeys.get(val); if (val instanceof Serializable) out.writeObject(io != null ? io : val); else { if (io == null) throw new NotSerializableException(val.getClass().getName()); out.writeObject(io); }
  public static void writeAttributeSet(ObjectOutputStream out, AttributeSet a)    throws IOException  {    Enumeration e = a.getAttributeNames();    while (e.hasMoreElements())      {        Object oldKey = e.nextElement();        Object newKey = getStaticAttribute(oldKey);        Object key = (newKey == null) ? oldKey : newKey;         out.writeObject(key);        out.writeObject(a.getAttribute(oldKey));      }    out.writeObject(null);    out.writeObject(null);  }