KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > java > util > InvalidPropertiesFormatException


1 /*
2  * 1.3 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package java.util;
9
10 import java.io.NotSerializableException JavaDoc;
11 import java.io.IOException JavaDoc;
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 1.3 03/12/19
24  * @see Properties
25  * @since 1.5
26  * @serial exclude
27  */

28
29 public class InvalidPropertiesFormatException extends IOException JavaDoc {
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 JavaDoc 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 JavaDoc 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 JavaDoc out)
58         throws NotSerializableException JavaDoc
59     {
60         throw new NotSerializableException JavaDoc("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 JavaDoc in)
68         throws NotSerializableException JavaDoc
69     {
70         throw new NotSerializableException JavaDoc("Not serializable.");
71     }
72
73 }
74
Popular Tags