InterruptedIOException (Java SE 15 & JDK 15) (original) (raw)

All Implemented Interfaces:

[Serializable](Serializable.html "interface in java.io")

Direct Known Subclasses:

[SocketTimeoutException](../net/SocketTimeoutException.html "class in java.net")


public class InterruptedIOException extends IOException

Signals that an I/O operation has been interrupted. AnInterruptedIOException is thrown to indicate that an input or output transfer has been terminated because the thread performing it was interrupted. The field bytesTransferred indicates how many bytes were successfully transferred before the interruption occurred.

Since:

1.0

See Also:

InputStream, OutputStream, Thread.interrupt(), Serialized Form

Fields

Modifier and Type Field Description
int bytesTransferred Reports how many bytes had been transferred as part of the I/O operation before it was interrupted.

Constructors

Constructor Description
InterruptedIOException() Constructs an InterruptedIOException withnull as its error detail message.
InterruptedIOException​(String s) Constructs an InterruptedIOException with the specified detail message.

Methods declared in class java.lang.Throwable

[addSuppressed](../lang/Throwable.html#addSuppressed%28java.lang.Throwable%29), [fillInStackTrace](../lang/Throwable.html#fillInStackTrace%28%29), [getCause](../lang/Throwable.html#getCause%28%29), [getLocalizedMessage](../lang/Throwable.html#getLocalizedMessage%28%29), [getMessage](../lang/Throwable.html#getMessage%28%29), [getStackTrace](../lang/Throwable.html#getStackTrace%28%29), [getSuppressed](../lang/Throwable.html#getSuppressed%28%29), [initCause](../lang/Throwable.html#initCause%28java.lang.Throwable%29), [printStackTrace](../lang/Throwable.html#printStackTrace%28%29), [printStackTrace](../lang/Throwable.html#printStackTrace%28java.io.PrintStream%29), [printStackTrace](../lang/Throwable.html#printStackTrace%28java.io.PrintWriter%29), [setStackTrace](../lang/Throwable.html#setStackTrace%28java.lang.StackTraceElement%5B%5D%29), [toString](../lang/Throwable.html#toString%28%29)