List of usage examples for java.net InetAddress getByName
public static InetAddress getByName(String host) throws UnknownHostException
From source file:Main.java
public static void main(String[] argv) throws Exception { InetAddress addr = InetAddress.getByName("www.google.com"); System.out.println(addr.getHostAddress()); }
From source file:Main.java
public static void main(String[] argv) throws Exception { InetAddress address = InetAddress.getByName("web.mit.edu"); System.out.println("Name: " + address.getHostName()); System.out.println("Addr: " + address.getHostAddress()); System.out.println(address.isMCLinkLocal()); }
From source file:Main.java
public static void main(String[] argv) throws Exception { InetAddress address = InetAddress.getByName("web.mit.edu"); System.out.println("Name: " + address.getHostName()); System.out.println("Addr: " + address.getHostAddress()); System.out.println("Reach: " + address.isReachable(3000)); }
From source file:Main.java
public static void main(String[] argv) throws Exception { InetAddress address = InetAddress.getByName("web.mit.edu"); System.out.println("Name: " + address.getHostName()); System.out.println("Addr: " + address.getHostAddress()); System.out.println(address.isMCNodeLocal()); }
From source file:Main.java
public static void main(String[] argv) throws Exception { InetAddress address = InetAddress.getByName("web.mit.edu"); System.out.println("Name: " + address.getHostName()); System.out.println("Addr: " + address.getHostAddress()); System.out.println(address.isMulticastAddress()); }
From source file:Main.java
public static void main(String[] argv) throws Exception { InetAddress address = InetAddress.getByName("web.mit.edu"); System.out.println("Name: " + address.getHostName()); System.out.println("Addr: " + address.getHostAddress()); System.out.println(address.isMCOrgLocal()); }
From source file:Main.java
public static void main(String[] argv) throws Exception { InetAddress address = InetAddress.getByName("web.mit.edu"); System.out.println("Name: " + address.getHostName()); System.out.println("Addr: " + address.getHostAddress()); System.out.println(address.isMCSiteLocal()); }
From source file:Main.java
public static void main(String[] argv) throws Exception { InetAddress address = InetAddress.getByName("web.mit.edu"); System.out.println("Name: " + address.getHostName()); System.out.println("Addr: " + address.getHostAddress()); System.out.println(address.isLinkLocalAddress()); }
From source file:Main.java
public static void main(String[] argv) throws Exception { InetAddress address = InetAddress.getByName("web.mit.edu"); System.out.println("Name: " + address.getHostName()); System.out.println("Addr: " + address.getHostAddress()); System.out.println(address.isSiteLocalAddress()); }
From source file:Main.java
public static void main(String[] argv) throws Exception { InetAddress address = InetAddress.getByName("web.mit.edu"); System.out.println("Name: " + address.getHostName()); System.out.println("Addr: " + address.getHostAddress()); System.out.println(address.isAnyLocalAddress()); }