Here you can find the source of isLikelyBroadcast(InetAddress address)
Parameter | Description |
---|---|
address | a parameter |
public static boolean isLikelyBroadcast(InetAddress address)
//package com.java2s; /**/* w w w .j a v a2 s.co m*/ * This file is a part of Angry IP Scanner source code, * see http://www.angryip.org/ for more information. * Licensed under GPLv2. */ import java.net.InetAddress; public class Main { /** * Checks whether the passed address is likely either a broadcast or network address * @param address */ public static boolean isLikelyBroadcast(InetAddress address) { byte[] bytes = address.getAddress(); return bytes[bytes.length - 1] == 0 || bytes[bytes.length - 1] == (byte) 0xFF; } }