Here you can find the source of isWindowsAutoConfiguredIPv4Address(InetAddress add)
Parameter | Description |
---|---|
add | the address to inspect |
public static boolean isWindowsAutoConfiguredIPv4Address(InetAddress add)
//package com.java2s; /*//from ww w. j a v a2 s . c om * Jitsi, the OpenSource Java VoIP and Instant Messaging client. * * Distributable under LGPL license. * See terms of license at gnu.org. */ import java.net.*; public class Main { /** * Determines whether the address is the result of windows auto configuration. * (i.e. One that is in the 169.254.0.0 network) * @param add the address to inspect * @return true if the address is autoconfigured by windows, false otherwise. */ public static boolean isWindowsAutoConfiguredIPv4Address(InetAddress add) { return (add.getAddress()[0] & 0xFF) == 169 && (add.getAddress()[1] & 0xFF) == 254; } }