• Post Reply Bookmark Topic Watch Topic
  • New Topic

API to convert IPV6 address to IPV4 ?  RSS feed

 
Edward Chen
Ranch Hand
Posts: 798
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In java, do we have an API to convert IPV6 address to IPV4 ? like "fe80::198:8ad2:22fe:2bff84"--> "127.0.0.1"

Thanks.

 
Rob Spoor
Sheriff
Posts: 21092
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I doubt it is possible; IPv6 can hold so many more IP addresses than IPv4. It's like trying to squeeze 100 clowns into a car that can hold only 10 clowns.

And your example mapping is invalid; that IP address is definitely not 127.0.0.1; that's ::1.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!