NetworkInterface isPointToPoint Example

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


NetworkInterface class isPointToPoint example. public boolean isPointToPoint() throws SocketException Returns whether a network interface is a point to point interface. A typical point to point interface would be a PPP connection through a modem.

Here is the code
/*
 * @ # IsLoopback.java
 * A class repersenting use to IsLoopback 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 a point to point
                interface."
+networkInterface.isPointToPoint());
    }
}

Output
Network interface is a point to point interface. false

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

HOME | COPYRIGHT | CONTACT US