|(Ogg-Vorbis format, 5Mbytes)||(WAV format, 26Mbytes)|
java.net.InetAddress has two subclasses
If your network stack is configured to use IPv6, you get an
Inet6Address, otherwise you get an
You can check if you have an IPv6 address by
You can check if a socket uses IPv6 by
if (address instanceof Inet6Address) ...
if (socket.getLocalAddress() instanceof Inet6Address) ...
localhost is 127.0.0.1.
localhost is 0:0:0:0:0:0:0:1
There are methods to tell if an IPv6 address is compatable with an IPv4 address, and some properties that can be set to tell the JVM to prefer IPv4 or IPv6. Apart from that, there appears to be little that Java gives you.