mirror of
https://gitee.com/dromara/hutool.git
synced 2025-05-03 12:18:01 +08:00
!508 change ipv4util getBeginIpLong to public
Merge pull request !508 from 不忘初心/v5-dev
This commit is contained in:
commit
cbc6682a5c
@ -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…
Reference in New Issue
Block a user