List of usage examples for java.net Inet6Address getByAddress
public static Inet6Address getByAddress(String host, byte[] addr, int scope_id) throws UnknownHostException
From source file:ch.cyberduck.core.socket.NetworkInterfaceAwareSocketFactory.java
/** * @param network Network interface index * @throws UnknownHostException/*from ww w. ja v a 2s.co m*/ */ private Inet6Address getByAddressForInterface(final NetworkInterface network, final InetAddress address) throws UnknownHostException { // Append network interface. Workaround for issue #8802 return Inet6Address.getByAddress(address.getHostAddress(), IPAddressUtil.textToNumericFormatV6(address.getHostAddress()), network.getIndex()); }