Inet4Address IsMCSiteLocal() Example

returns a boolean if the address has a multicast address of site-local scope,


Inet4Addressclass IsMCSiteLocal() method example. This example shows you how to use IsMCSiteLocal() method.This method returns a boolean if the address has a multicast address of site-local scope,

Here is the code:-
/* 
 * @Program to check if the multicast address has site scope.
 * IsMCSiteLocal.java 
 * Author:-RoseIndia Team
 * Date:-28-Jun-2008
 */

import java.net.*;
import java.util.*;

public class IsMCSiteLocal {

    public static void main(String[] argsthrows Exception {
        InetAddress i = Inet4Address.getByName("localhost");
        boolean b = i.isMCSiteLocal();
        System.out.println("Multicast address has site scope: " + b);
    }
}

Output of the program:-
 Multicast address has site scope: false

Post Comment
Name:
E-mail:
Contact no :
Comments:
  Refresh Image
Verify Image:
 
 
Your Comment's
 
 
 

HOME | COPYRIGHT | CONTACT US