1   /*
2    * %I% %E%
3    *
4    * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
5    * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6    */
7   
8   package java.util;
9   
10  import java.io.NotSerializableException;
11  import java.io.IOException;
12  
13  /**
14   * Thrown to indicate that an operation could not complete because
15   * the input did not conform to the appropriate XML document type
16   * for a collection of properties, as per the {@link Properties} 
17   * specification.<p>
18   * 
19   * Note, that although InvalidPropertiesFormatException inherits Serializable
20   * interface from Exception, it is not intended to be Serializable. Appropriate
21   * serialization methods are implemented to throw NotSerializableException.
22   *
23   * @version %I% %E%
24   * @see     Properties
25   * @since   1.5
26   * @serial exclude
27   */
28  
29  public class InvalidPropertiesFormatException extends IOException {
30      /**
31       * Constructs an InvalidPropertiesFormatException with the specified
32       * cause.
33       *
34       * @param  cause the cause (which is saved for later retrieval by the
35       *         {@link Throwable#getCause()} method).
36       */
37      public InvalidPropertiesFormatException(Throwable cause) {
38          super(cause==null ? null : cause.toString());
39          this.initCause(cause);
40      }
41  
42     /**
43      * Constructs an InvalidPropertiesFormatException with the specified
44      * detail message.
45      *
46      * @param   message   the detail message. The detail message is saved for 
47      *          later retrieval by the {@link Throwable#getMessage()} method.
48      */
49      public InvalidPropertiesFormatException(String message) {
50          super(message);
51      }
52  
53      /**
54       * Throws NotSerializableException, since InvalidPropertiesFormatException
55       * objects are not intended to be serializable.
56       */
57      private void writeObject(java.io.ObjectOutputStream out)
58          throws NotSerializableException 
59      {
60          throw new NotSerializableException("Not serializable.");
61      }
62  
63      /**
64       * Throws NotSerializableException, since InvalidPropertiesFormatException
65       * objects are not intended to be serializable.
66       */
67      private void readObject(java.io.ObjectInputStream in)
68          throws NotSerializableException 
69      {
70          throw new NotSerializableException("Not serializable.");
71      }
72  
73  }
74