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