Package java.net

Class ConnectException

  • All Implemented Interfaces:
    Serializable

    public class ConnectException
    extends SocketException
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific port.

    Most applications should not catch this exception; it is more robust to catch the superclass SocketException.

    See Also:
    Serialized Form
    • Constructor Detail

      • ConnectException

        public ConnectException()
        Constructs a new instance.
      • ConnectException

        public ConnectException​(String detailMessage)
        Constructs a new instance with the given detail message.
      • ConnectException

        public ConnectException​(String detailMessage,
                                Throwable cause)
        Constructs a new instance with the given detail message and cause.