Package java.net

Class UnknownHostException

All Implemented Interfaces:
Serializable

public class UnknownHostException
extends IOException
Thrown when a hostname can not be resolved.
See Also:
Serialized Form
  • Constructor Details

    • UnknownHostException

      public UnknownHostException()
      Constructs a new UnknownHostException instance with no detail message. Callers should usually supply a detail message.
    • UnknownHostException

      public UnknownHostException​(String detailMessage)
      Constructs a new UnknownHostException instance 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.