1. /*
  2. * @(#)InvalidKeyException.java 1.16 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.security;
  8. /**
  9. * This is the exception for invalid Keys (invalid encoding, wrong
  10. * length, uninitialized, etc).
  11. *
  12. * @version 1.16, 12/19/03
  13. * @author Benjamin Renaud
  14. */
  15. public class InvalidKeyException extends KeyException {
  16. private static final long serialVersionUID = 5698479920593359816L;
  17. /**
  18. * Constructs an InvalidKeyException with no detail message. A
  19. * detail message is a String that describes this particular
  20. * exception.
  21. */
  22. public InvalidKeyException() {
  23. super();
  24. }
  25. /**
  26. * Constructs an InvalidKeyException with the specified detail
  27. * message. A detail message is a String that describes this
  28. * particular exception.
  29. *
  30. * @param msg the detail message.
  31. */
  32. public InvalidKeyException(String msg) {
  33. super(msg);
  34. }
  35. /**
  36. * Creates a <code>InvalidKeyException</code> with the specified
  37. * detail message and cause.
  38. *
  39. * @param message the detail message (which is saved for later retrieval
  40. * by the {@link #getMessage()} method).
  41. * @param cause the cause (which is saved for later retrieval by the
  42. * {@link #getCause()} method). (A <tt>null</tt> value is permitted,
  43. * and indicates that the cause is nonexistent or unknown.)
  44. * @since 1.5
  45. */
  46. public InvalidKeyException(String message, Throwable cause) {
  47. super(message, cause);
  48. }
  49. /**
  50. * Creates a <code>InvalidKeyException</code> with the specified cause
  51. * and a detail message of <tt>(cause==null ? null : cause.toString())</tt>
  52. * (which typically contains the class and detail message of
  53. * <tt>cause</tt>).
  54. *
  55. * @param cause the cause (which is saved for later retrieval by the
  56. * {@link #getCause()} method). (A <tt>null</tt> value is permitted,
  57. * and indicates that the cause is nonexistent or unknown.)
  58. * @since 1.5
  59. */
  60. public InvalidKeyException(Throwable cause) {
  61. super(cause);
  62. }
  63. }