1. /*
  2. * @(#)InterruptedIOException.java 1.18 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.io;
  8. /**
  9. * Signals that an I/O operation has been interrupted. An
  10. * <code>InterruptedIOException</code> is thrown to indicate that an
  11. * input or output transfer has been terminated because the thread
  12. * performing it was interrupted. The field {@link #bytesTransferred}
  13. * indicates how many bytes were successfully transferred before
  14. * the interruption occurred.
  15. *
  16. * @author unascribed
  17. * @version 1.18, 01/23/03
  18. * @see java.io.InputStream
  19. * @see java.io.OutputStream
  20. * @see java.lang.Thread#interrupt()
  21. * @since JDK1.0
  22. */
  23. public
  24. class InterruptedIOException extends IOException {
  25. /**
  26. * Constructs an <code>InterruptedIOException</code> with
  27. * <code>null</code> as its error detail message.
  28. */
  29. public InterruptedIOException() {
  30. super();
  31. }
  32. /**
  33. * Constructs an <code>InterruptedIOException</code> with the
  34. * specified detail message. The string <code>s</code> can be
  35. * retrieved later by the
  36. * <code>{@link java.lang.Throwable#getMessage}</code>
  37. * method of class <code>java.lang.Throwable</code>.
  38. *
  39. * @param s the detail message.
  40. */
  41. public InterruptedIOException(String s) {
  42. super(s);
  43. }
  44. /**
  45. * Reports how many bytes had been transferred as part of the I/O
  46. * operation before it was interrupted.
  47. *
  48. * @serial
  49. */
  50. public int bytesTransferred = 0;
  51. }