/[classpath]/classpath/java/util/prefs/InvalidPreferencesFormatException.java
ViewVC logotype

Diff of /classpath/java/util/prefs/InvalidPreferencesFormatException.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by mark, Tue Jan 22 22:27:02 2002 UTC revision 1.3 by ericb, Sun Feb 24 04:25:17 2002 UTC
# Line 1  Line 1 
1  /* InvalidPreferenceFormatException - Indicates reading prefs from stream failed  /* InvalidPreferencesFormatException - indicates reading prefs from stream
2     Copyright (C) 2001 Free Software Foundation, Inc.     failed
3       Copyright (C) 2001, 2002 Free Software Foundation, Inc.
4    
5  This file is part of GNU Classpath.  This file is part of GNU Classpath.
6    
# Line 7  GNU Classpath is free software; you can Line 8  GNU Classpath is free software; you can
8  it under the terms of the GNU General Public License as published by  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation; either version 2, or (at your option)  the Free Software Foundation; either version 2, or (at your option)
10  any later version.  any later version.
11    
12  GNU Classpath is distributed in the hope that it will be useful, but  GNU Classpath is distributed in the hope that it will be useful, but
13  WITHOUT ANY WARRANTY; without even the implied warranty of  WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Line 37  exception statement from your version. * Line 38  exception statement from your version. *
38    
39  package java.util.prefs;  package java.util.prefs;
40    
41    import java.io.ObjectOutputStream;
42    import java.io.ObjectInputStream;
43    import java.io.NotSerializableException;
44    
45  /**  /**
46   * Indicates reading prefs from stream failed. Thrown by the   * Indicates reading prefs from stream failed. Thrown by the
47   * <code>importPreferences()</code> method when the supplied input stream   * <code>importPreferences()</code> method when the supplied input stream
48   * could not be read because it was not in the correct XML format.   * could not be read because it was not in the correct XML format.
49   *   *
50     * <p>Note that although this class inherits the Serializable interface, an
51     * attempt to serialize will fail with a <code>NotSerializableException</code>.
52     *
53     * @author Mark Wielaard <mark@klomp.org>
54     * @see Preferences
55   * @since 1.4   * @since 1.4
56   * @author Mark Wielaard (mark@klomp.org)   * @status updated to 1.4
57   */   */
58  public class InvalidPreferencesFormatException extends Exception {  public class InvalidPreferencesFormatException extends Exception
59    {
60      /**    /**
61       * Creates a new exception with a descriptive message.     * Creates a new exception with a descriptive message. The cause remains
62       */     * uninitialized.
63      public InvalidPreferencesFormatException(String message) {     *
64          super(message);     * @param message the message
65      }     */
66      public InvalidPreferencesFormatException(String message)
67      /**    {
68       * Creates a new exception with the given cause.      super(message);
69       */    }
70      public InvalidPreferencesFormatException(Throwable cause) {  
71          // XXX - Use when we have 1.4 Throwable support    /**
72          // super(cause);     * Creates a new exception with the given cause.
73          super();     *
74      }     * @param cause the cause
75       */
76      /**    public InvalidPreferencesFormatException(Throwable cause)
77       * Creates a new exception with a descriptive message and a cause.    {
78       */      super(cause);
79      public InvalidPreferencesFormatException(String message, Throwable cause) {    }
80          // XXX - Use when we have 1.4 Throwable support  
81          // super(message, cause);    /**
82          super(message);     * Creates a new exception with a descriptive message and a cause.
83      }     *
84       * @param message the message
85       * @param cause the cause
86       */
87      public InvalidPreferencesFormatException(String message, Throwable cause)
88      {
89        super(message, cause);
90        super(message);
91      }
92    
93      /**
94       * This class should not be serialized.
95       *
96       * @param o the output stream
97       */
98      private void writeObject(ObjectOutputStream o)
99      {
100        throw new NotSerializableException
101          ("java.util.prefs.InvalidPreferencesFormatException");
102      }
103    
104      /**
105       * This class should not be serialized.
106       *
107       * @param i the input stream
108       */
109      private void readObject(ObjectInputStream i)
110      {
111        throw new NotSerializableException
112          ("java.util.prefs.InvalidPreferencesFormatException");
113      }
114  }  }

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26