InetAddress.isMCSiteLocal() has the following syntax.
public boolean isMCSiteLocal()
In the following code shows how to use InetAddress.isMCSiteLocal() method.
import java.net.InetAddress; /*from w w w .ja v a2 s. c o m*/ public class Main { 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()); } }
The code above generates the following result.