Lets say I have this:
SubnetUtils utils = new SubnetUtils("192.168.1.0/24");
utils.getInfo().getNetmask() // = 255.255.255.0
Is there a easy way of getting the mask inverted (Cisco ACL style)?
eg.: 0.0.0.255
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I put up a code that might work for your case. However, maybe there is a library that does it in a more optimized way?