I want to get the content of http://en.wikipedia.org using java.net.URL
's openConnection()
method.
I find that en.wikiepdia.org has both IPv4 and IPv6 address:
$ host en.wikipedia.org
en.wikipedia.org is an alias for wikipedia-lb.wikimedia.org.
wikipedia-lb.wikimedia.org is an alias for wikipedia-lb.eqiad.wikimedia.org.
wikipedia-lb.eqiad.wikimedia.org has address 208.80.154.225
wikipedia-lb.eqiad.wikimedia.org has IPv6 address 2620:0:861:ed1a::1
How can I access that site using IPv6 address?