code: public static Inet6Address getByAddress(String host, byte[] addr, NetworkInterface nif)
          throws UnknownHostException {
          if (host != null && host.length() > 0 && host.charAt(0) == '[') {
              if (host.charAt(host.length()-1) == ']') {
                  host = host.substring(1, host.length() -1);
              }
          }
          if (addr != null) {
              if (addr.length == Inet6Address.INADDRSZ) {
                  return new Inet6Address(host, addr, nif);
              }
          }
          throw new UnknownHostException("addr is of illegal length");
      }
docs: Create an Inet6Address in the exact manner of {@link InetAddress#getByAddress(String,byte[])}
  except that the IPv6 scope_id is set to the value corresponding to the given interface
  for the address type specified in <code>addr</code>.
  The call will fail with an UnknownHostException if the given interface does not have a numeric
  scope_id assigned for the given address type (eg. link-local or site-local).
  See <a href="Inet6Address.html#scoped">here</a> for a description of IPv6
  scoped addresses.
  
  @param host the specified host
  @param addr the raw IP address in network byte order
  @param nif an interface this address must be associated with.
  @return  an Inet6Address object created from the raw IP address.
  @exception  UnknownHostException  if IP address is of illegal length, or if the interface
  does not have a numeric scope_id assigned for the given address type.
  
  @since 1.5