NetworkInterface supportsMulticast Example

NetworkInterface class supportsMulticast example. This example shows you how to use supportsMulticast method.


NetworkInterface class supportsMulticast example. public boolean supportsMulticast() throws SocketException Returns whether a network interface supports multicasting or not.

Here is the code
/*
 * @ # SupportsMulticast.java
 * A class repersenting use to supportsMulticast method 
 * of URL class in java.net package
 * version 23 June 2008
 * author Rose India 
 */

import java.net.*;

public class IsPointToPoint {

    public static void main(String args[]) throws Exception {

        byte b[] {127001};
        InetAddress inetAddress = InetAddress.getByAddress(b);
        NetworkInterface networkInterface =
                NetworkInterface.getByInetAddress(inetAddress);
        System.out.println("network interface is supports multicast " +
                networkInterface.supportsMulticast());
    }
}

Output
network interface is supports multicast false

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

HOME | COPYRIGHT | CONTACT US