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