InetAddress IsMCSiteLocal() Example
Utility routine to check if the multicast address has site scope.
InetAddressclass IsMCSiteLocal() method example. This example shows you how to use IsMCSiteLocal() method.This method gives Utility routine to check if the multicast address has site scope.
Here is the code:-
/*
* @Program that gives Utility routine to check if the multicast address has
site scope.
* IsMCSiteLocal.java
* Author:-RoseIndia Team
* Date:-19-Jun-2008
*/
import java.net.*;
public class IsMCSiteLocal {
public static void main(String[] args) throws UnknownHostException{
InetAddress ia = InetAddress.getLocalHost();
System.out.println("Multicast address has site scope.: "+ia.isMCSiteLocal());
}
} |
Output of the program:-
| Multicast address has site scope.: false |
|