UnknownHostException

  • UnknownHostException signals that the IP address of a host could not be determined.

  • It's a subclass of IOException and provides constructors to include an optional detail message about the host.

  • The exception inherits methods from Throwable for stack trace and error handling.

  • UnknownHostException can be thrown during network operations when a hostname cannot be resolved to an IP address.

public class UnknownHostException extends IOException

Thrown to indicate that the IP address of a host could not be determined.

Public Constructor Summary

UnknownHostException(String host)
Constructs a new UnknownHostException with the specified detail message.
UnknownHostException()
Constructs a new UnknownHostException with no detail message.

Inherited Method Summary

Public Constructors

public UnknownHostException (String host)

Constructs a new UnknownHostException with the specified detail message.

Parameters
host the detail message.

public UnknownHostException ()

Constructs a new UnknownHostException with no detail message.