Inet4Address IsMCOrgLocal() Example
returns a boolean if the address has a multicast address of organization
Inet4Addressclass IsMCOrgLocal() method example. This example shows you how to use IsMCOrgLocal() method.This method returns a boolean if the address has a multicast address of organization
Here is the code:-
/*
* @Program to check if the multicast address has organization scope.
* IsMCOrgLocal.java
* Author:-RoseIndia Team
* Date:-28-Jun-2008
*/
import java.net.*;
import java.util.*;
public class IsMCOrgLocal {
public static void main(String[] args) throws Exception {
InetAddress i = Inet4Address.getByName("localhost");
boolean b = i.isMCOrgLocal();
System.out.println("Multicast address has organisation scope: " + b);
}
} |
Output of the program:-
Multicast address has organisation scope: false
|
|