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. package java.util;
  8. import java.io.NotSerializableException;
  9. import java.io.IOException;
  10. /**
  11. * Thrown to indicate that an operation could not complete because
  12. * the input did not conform to the appropriate XML document type
  13. * for a collection of properties, as per the {@link Properties}
  14. * specification.<p>
  15. *
  16. * Note, that although InvalidPropertiesFormatException inherits Serializable
  17. * interface from Exception, it is not intended to be Serializable. Appropriate
  18. * serialization methods are implemented to throw NotSerializableException.
  19. *
  20. * @version 1.3 03/12/19
  21. * @see Properties
  22. * @since 1.5
  23. * @serial exclude
  24. */
  25. public class InvalidPropertiesFormatException extends IOException {
  26. /**
  27. * Constructs an InvalidPropertiesFormatException 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 InvalidPropertiesFormatException(Throwable cause) {
  34. super(cause==null ? null : cause.toString());
  35. this.initCause(cause);
  36. }
  37. /**
  38. * Constructs an InvalidPropertiesFormatException with the specified
  39. * detail message.
  40. *
  41. * @param message the detail message. The detail message is saved for
  42. * later retrieval by the {@link Throwable#getMessage()} method.
  43. */
  44. public InvalidPropertiesFormatException(String message) {
  45. super(message);
  46. }
  47. /**
  48. * Throws NotSerializableException, since InvalidPropertiesFormatException
  49. * objects are not intended to be serializable.
  50. */
  51. private void writeObject(java.io.ObjectOutputStream out)
  52. throws NotSerializableException
  53. {
  54. throw new NotSerializableException("Not serializable.");
  55. }
  56. /**
  57. * Throws NotSerializableException, since InvalidPropertiesFormatException
  58. * objects are not intended to be serializable.
  59. */
  60. private void readObject(java.io.ObjectInputStream in)
  61. throws NotSerializableException
  62. {
  63. throw new NotSerializableException("Not serializable.");
  64. }
  65. }