Thanks objects.
I have a Java piece that receives IPs as int32 in a message from a C/C++ application. These IPs are in HBO. Java application needs to convert these to standard dots and string notation as well as NBO. I was hoping there would be some standard libraries that would help do this. This ought to be a fairly common problem to solve :) ... I may sound cynic but I am not familiar with Java and this not being part of standard lib sounds very odd - oversight on part of developers??
Even if this is not part of standard library, is there some widely used 3rd party/open source piece of code that you can point me to? I'd rather not reinvent the wheel :) .. thanks again.
Main Topics
Browse All Topics





by: objectsPosted on 2009-09-09 at 23:39:52ID: 25297802
thre is no equivalent in java so you need to implement it yourself with some help from InetAddress
ip/24324
m.au/java/ how-to-con vert-a-lon g-to- a-byt e-array
http://www.devx.com/tips/T
you can adapt the following to convert an int to a byte array
http://helpdesk.objects.co