SocketTimeoutException

  • SocketTimeoutException signals that a timeout has occurred during a socket read or accept operation.

  • It is a subclass of InterruptedIOException and inherits a field indicating the number of bytes transferred before the timeout.

  • Two constructors are available: one with a detailed message and one without.

  • SocketTimeoutException provides methods to retrieve the detail message and the number of bytes transferred.

public class SocketTimeoutException extends InterruptedIOException

Signals that a timeout has occurred on a socket read or accept.

Inherited Field Summary

Public Constructor Summary

SocketTimeoutException(String msg)
Constructs a new SocketTimeoutException with a detail message.
SocketTimeoutException()
Construct a new SocketTimeoutException with no detailed message.

Inherited Method Summary

Public Constructors

public SocketTimeoutException (String msg)

Constructs a new SocketTimeoutException with a detail message.

Parameters
msg the detail message

public SocketTimeoutException ()

Construct a new SocketTimeoutException with no detailed message.