Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Java API to find IP Address Range?

Reply
Thread Tools

Java API to find IP Address Range?

 
 
Unknown
Guest
Posts: n/a
 
      07-29-2003
Hi Folks,

Is there any Java API/code snippet to find the list of all IP Address in
a given range? Say example,

if i give startIP = 192.168.254.6 and endIP = 192.168.254.8, the output
should be,

192.168.254.6,192.168.254.7,192.168.254.8

I am looking if i can reuse rather than reinvent the wheel.

Thanks for ur help,







 
Reply With Quote
 
 
 
 
Roedy Green
Guest
Posts: n/a
 
      07-29-2003
On Wed, 30 Jul 2003 00:14:53 +0530, "Unknown" <(E-Mail Removed)> wrote or
quoted :

> 192.168.254.6,192.168.254.7,192.168.254.8


these are just unsigned 32 bit binary numbers. You can enumerate them
with a for loop.

What you want is a way of formatting them back with octets separated
by dots.

See InetAddress.getHostAddress();

--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Finding SMTP host and port knowing the e-mail address using JAVA API Andreea Java 0 04-21-2012 07:12 PM
How to exclude action of Find::Find::find in subdirectories withknown names? vdvorkin Perl Misc 0 02-10-2011 05:18 PM
Re: Finding IP address of localhost via socket API (or other API) Timothy Grant Python 5 08-06-2008 03:35 AM
Find.find does not find orphaned links? Wybo Dekker Ruby 1 11-15-2005 02:50 PM
where to find other java api collections like following web address?@@. mikeotp Java 2 12-20-2004 12:20 PM



Advertisments