Archive for March 25th, 2009
Checking if an IP is in a subnet range. SubnetUtils.SubnetInfo isInRange bug.
1 Comment Published March 25th, 2009 in JavaToday I used commons-net to verify when an IP address is in a subnet specified in CIDR notation. So, I got a bug. This code: SubnetUtils utils = new SubnetUtils("77.24.0.0/16"); System.out.println("lower address: " + utils.getInfo().getLowAddress()); System.out.println("higher address: " + utils.getInfo().getHighAddress()); System.out.println("77.23.255.254 is in range? :" + utils.getInfo().isInRange( "77.23.255.254" )); gives this output: lower address: 77.24.0.1 [...]
Search
About
You are currently browsing the NewInstance weblog archives for the day Wednesday, March 25th, 2009.
Longer entries are truncated. Click the headline of an entry to read it in its entirety.Calendar
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « Feb | Apr » | |||||
| 1 | ||||||
| 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| 9 | 10 | 11 | 12 | 13 | 14 | 15 |
| 16 | 17 | 18 | 19 | 20 | 21 | 22 |
| 23 | 24 | 25 | 26 | 27 | 28 | 29 |
| 30 | 31 | |||||
Archives
Categories
Tag Cloud
Android API Bash Bios CSS Development Eclipse Encription Error Handling Font Git Google GWT Hardware How-To HTML Installation iPod Java JavaScript Karmic Linux Lucks MacBook Open Source Opinion OSX Pitfalls Pkg Practices Python Resume Security Software Suspend TDD Testing Tools Top Down Tricks Ubuntu Uninstall Wakup On Lan Web Workaround
WP Cumulus Flash tag cloud by Roy Tanck and Luke Morton requires Flash Player 9 or better.




