1. /*
  2. * @(#)PrinterIOException.java 1.9 00/02/02
  3. *
  4. * Copyright 1998-2000 Sun Microsystems, Inc. All Rights Reserved.
  5. *
  6. * This software is the proprietary information of Sun Microsystems, Inc.
  7. * Use is subject to license terms.
  8. *
  9. */
  10. package java.awt.print;
  11. import java.io.IOException;
  12. /**
  13. * The <code>PrinterIOException</code> class is a subclass of
  14. * {@link PrinterException} and is used to indicate that an IO error
  15. * of some sort has occurred while printing.
  16. */
  17. public class PrinterIOException extends PrinterException {
  18. /**
  19. * The IO error that terminated the print job.
  20. * @serial
  21. */
  22. private IOException mException;
  23. /**
  24. * Constructs a new <code>PrinterIOException</code>
  25. * with the string representation of the specified
  26. * {@link IOException}.
  27. * @param exception the specified <code>IOException</code>
  28. */
  29. public PrinterIOException(IOException exception) {
  30. super(exception.toString());
  31. mException = exception;
  32. }
  33. /**
  34. * Returns the <code>IOException</code> that terminated
  35. * the print job.
  36. * @return the <code>IOException</code> that terminated
  37. * the print job.
  38. * @see java.io.IOException
  39. */
  40. public IOException getIOException() {
  41. return mException;
  42. }
  43. }