Top Description Fields Constructors
java.net

public Class SocketException

extends IOException
Class Inheritance
Known Direct Subclasses
sun.net.ConnectionResetException, java.net.BindException, java.net.ConnectException, java.net.NoRouteToHostException, java.net.PortUnreachableException
Imports
java.io.IOException

Thrown to indicate that there is an error creating or accessing a Socket.
Author
Jonathan Payne
Since
1.0

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
public
SocketException(String
the detail message.
msg
)

Constructs a new SocketException with the specified detail message.

public
SocketException()

Constructs a new SocketException with no detail message.

public
SocketException(String
the detail message.
msg
,
Throwable
the cause
cause
)

Constructs a new SocketException with the specified detail message and cause.

public
SocketException(Throwable
the cause
cause
)

Constructs a new SocketException with the specified cause.

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.io.IOException.serialVersionUID.

Annotations
@Serial

Constructor Detail

SocketExceptionback to summary
public SocketException(String msg)

Constructs a new SocketException with the specified detail message.

Parameters
msg:String

the detail message.

SocketExceptionback to summary
public SocketException()

Constructs a new SocketException with no detail message.

SocketExceptionback to summary
public SocketException(String msg, Throwable cause)

Constructs a new SocketException with the specified detail message and cause.

Parameters
msg:String

the detail message.

cause:Throwable

the cause

Since
19
SocketExceptionback to summary
public SocketException(Throwable cause)

Constructs a new SocketException with the specified cause.

Parameters
cause:Throwable

the cause

Since
19