FileDocCategorySizeDatePackage
XMLParseException.javaAPI DocJava SE 5 API4535Fri Aug 26 14:57:34 BST 2005javax.management.modelmbean

XMLParseException

public class XMLParseException extends Exception
This exception is thrown when an XML formatted string is being parsed into ModelMBean objects or when XML formatted strings are being created from ModelMBean objects. It is also used to wrapper exceptions from XML parsers that may be used.
since
1.5

Fields Summary
private static final long
oldSerialVersionUID
private static final long
newSerialVersionUID
private static final ObjectStreamField[]
oldSerialPersistentFields
private static final ObjectStreamField[]
newSerialPersistentFields
private static final long
serialVersionUID
private static final ObjectStreamField[]
serialPersistentFields
private static boolean
compat
Constructors Summary
public XMLParseException()
Default constructor .

  
     
	try {
	    PrivilegedAction act = new GetPropertyAction("jmx.serial.form");
	    String form = (String) AccessController.doPrivileged(act);
	    compat = (form != null && form.equals("1.0"));
	} catch (Exception e) {
	    // OK: No compat with 1.0
	}
	if (compat) {
	    serialPersistentFields = oldSerialPersistentFields;
	    serialVersionUID = oldSerialVersionUID;
	} else {
	    serialPersistentFields = newSerialPersistentFields;
	    serialVersionUID = newSerialVersionUID;
	}
    
      super("XML Parse Exception.");
    
public XMLParseException(String s)
Constructor taking a string.

param
s the detail message.

      super("XML Parse Exception: " + s);
    
public XMLParseException(Exception e, String s)
Constructor taking a string and an exception.

param
e the nested exception.
param
s the detail message.

      super("XML Parse Exception: " + s + ":" + e.toString());
    
Methods Summary
private voidreadObject(java.io.ObjectInputStream in)
Deserializes an {@link XMLParseException} from an {@link ObjectInputStream}.

      // New serial form ignores extra field "msgStr"
      in.defaultReadObject();
    
private voidwriteObject(java.io.ObjectOutputStream out)
Serializes an {@link XMLParseException} to an {@link ObjectOutputStream}.

      if (compat)
      {
        // Serializes this instance in the old serial form
        //
        ObjectOutputStream.PutField fields = out.putFields();
	fields.put("msgStr", getMessage());
	out.writeFields();
      }
      else
      {
        // Serializes this instance in the new serial form
        //
        out.defaultWriteObject();
      }