Here you can find the source of isPubliclyRoutable(final InetAddress addrIP)
Parameter | Description |
---|---|
addrIP | a parameter |
public static boolean isPubliclyRoutable(final InetAddress addrIP)
//package com.java2s; //License from project: Open Source License import java.net.InetAddress; public class Main { /**// www .ja v a 2s . c om * Determines whether a particular IP address is publicly routable on the internet * * @param addrIP * * @return */ public static boolean isPubliclyRoutable(final InetAddress addrIP) { if (addrIP == null) throw new NullPointerException("isPubliclyRoutable requires an IP address be passed to it!"); return !addrIP.isSiteLocalAddress() && !addrIP.isLinkLocalAddress() && !addrIP.isLoopbackAddress(); } }