https://docs.oracle.com/javase/7/docs/api/java/net/Inet6Address.html
public static Inet6Address getByAddress(String host,
byte[] addr,
int scope_id)
Inet6Address is supposed to hold something like sockaddr_in6 sans port number (16 address bytes plus scope_id if link-local), at least what I think of it. Given 16 bytes and scope id, I suppose that Inet6Address should be fully specified, without the need for further bits. Yet there is extra argument host...
Documentation links to explanation of InetAddr.getByAddress(String,byte[]), which also contains unclear snippet:
Creates an InetAddress based on the provided host name and IP address. No name service is checked for the validity of the address.
The host name can either be a machine name, such as "java.sun.com", or a textual representation of its IP address.No validity checking is done on the host name either.
If no DNS then why hostname is needed at all when there are already bytes supplied? Will it work with null instead of host? Why there is no getByAddress with just addr and scope_id (without host)?