All About Class NoRouteToHostException in Java


An application can throw this -NoRouteToHostException exception to indicate a socket could not be connected with remote host, as the host could not be connected due to one of the following reasons:

  • Host could not be connected before establishing socket
  • Some intermediate link/links between local machine to host is/are down.
  • Host may be behind a firewall.
This excaption-NoRouteToHostException is a subclass of SocketException.
The structure of NoRouteToHostException is given as:

public class java.net.NoRouteToHostException extends java.io.SocketException{
//constrcutors:
public NoRouteToHostException();//default constrcutor
public NoRouteToHostException(String message);
}
 
All About Class NoRouteToHostException in Java All About Class NoRouteToHostException in Java Reviewed by Animesh Chatterjee on December 10, 2018 Rating: 5

No comments:

Powered by Blogger.