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