Package java.net
Class UnknownHostException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.io.IOException
-
- java.net.UnknownHostException
-
- All Implemented Interfaces:
Serializable
public class UnknownHostException extends IOException
Thrown when a hostname can not be resolved.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description UnknownHostException()Constructs a newUnknownHostExceptioninstance with no detail message.UnknownHostException(String detailMessage)Constructs a newUnknownHostExceptioninstance with the given detail message.
-
Method Summary
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
UnknownHostException
public UnknownHostException()
Constructs a newUnknownHostExceptioninstance with no detail message. Callers should usually supply a detail message.
-
UnknownHostException
public UnknownHostException(String detailMessage)
Constructs a newUnknownHostExceptioninstance with the given detail message. The detail message should generally contain the hostname and a reason for the failure, if known.- Parameters:
detailMessage- the detail message for this exception.
-
-