java.net.SocketException
java.io.IOException
java.net.BindException,
java.net.ConnectException,
java.net.NoRouteToHostException
None
JDK 1.0 and later
A SocketException is thrown when an error occurs while a socket is being used. As of JDK 1.1, there are some more specific subclasses of SocketException, namely BindException, ConnectException, and NoRouteToHostException.
public class java.net.SocketException extends java.io.IOException {
// Constructors
public SocketException();
public SocketException(String msg);
}
This constructor creates a SocketException with no associated detail message.
The detail message.
This constructor creates a SocketException with the specified detail message.
| Method | Inherited From | Method | Inherited From |
|---|---|---|---|
|
clone() |
Object |
equals(Object) |
Object |
|
fillInStackTrace() |
Throwable |
finalize() |
Object |
|
getClass() |
Object |
getLocalizedMessage() |
Throwable |
|
getMessage() |
Throwable |
hashCode() |
Object |
|
notify() |
Object |
notifyAll() |
Object |
|
printStackTrace() |
Throwable |
printStackTrace(PrintStream) |
Throwable |
|
printStackTrace(PrintWriter) |
Throwable |
toString() |
Throwable |
|
wait() |
Object |
wait(long) |
Object |
|
wait(long, int) |
Object |
BindException, ConnectException, Exception, IOException, NoRouteToHostException, RuntimeException