mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-04-19 03:01:48 +08:00
change ipv4util getBeginIpLong to public
This commit is contained in:
parent
db5bd528ce
commit
7ef7ac52f0
@ -187,7 +187,7 @@ public class Ipv4Util {
|
||||
* @param maskBit 给定的掩码位,如30
|
||||
* @return 起始IP的长整型表示
|
||||
*/
|
||||
private static Long getBeginIpLong(String ip, int maskBit) {
|
||||
public static Long getBeginIpLong(String ip, int maskBit) {
|
||||
return ipv4ToLong(ip) & ipv4ToLong(getMaskByMaskBit(maskBit));
|
||||
}
|
||||
|
||||
@ -348,7 +348,7 @@ public class Ipv4Util {
|
||||
* @param maskBit 给定的掩码位,如30
|
||||
* @return 终止IP的长整型表示
|
||||
*/
|
||||
private static Long getEndIpLong(String ip, int maskBit) {
|
||||
public static Long getEndIpLong(String ip, int maskBit) {
|
||||
return getBeginIpLong(ip, maskBit)
|
||||
+ ~ipv4ToLong(getMaskByMaskBit(maskBit));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user