[Chapter 15] ConnectException
Author: Mark Grand and Jonathan Knudsen
Date: Fri Aug 8 17:21:31 1997

#

| Chapter 15 The java.net Package |

# ConnectException

## Name

ConnectException

## Synopsis

Class Name:

  `java.net.ConnectException`

Superclass:

  `java.net.SocketException`

Immediate Subclasses:

  None

Interfaces Implemented:

  None

Availability:

  New as of JDK 1.1

## Description

A `ConnectException` is thrown when a socket connection cannot be established with a remote machine. This type of exception usually indicates that there is no listening process on the remote machine.

## Class Summary

    public class java.net.ConnectException extends java.net.SocketException {
      // Constructors
      public ConnectException();
      public ConnectException(String msg);
    }

## Constructors

### ConnectException

#### public ConnectException()

Description

  This constructor `create`s a `ConnectException` with no associated detail message.

#### public ConnectException(String msg)

Parameters

  `msg`

    The detail message.

Description

  This constructor create a `ConnectException` with the specified detail message.

## Inherited Methods

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` |  |

## See Also

`Exception`, `IOException`, `SocketException`

BindException |  | ContentHandler