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