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