I've followed the answer in https://stackoverflow.com/a/2241269/2458223 (which William Brendel suggested) but most of the time returns wrong results when i compare the results with MYSQL. Please review
InetAddress bar = InetAddress.getByName("187.210.139.0");
value = ByteBuffer.wrap(bar.getAddress()).getInt();
results you can view here...
JAVA Results: (Refer: http://ideone.com/CJ3qCU )
returns: 1143829760
MYSQL Results:
mysql> select inet_aton("187.210.139.0");
+----------------------------+
| inet_aton("187.210.139.0") |
+----------------------------+
| 3151137536 |
+----------------------------+
What is issue here.. any bug?? Please help!!