< prev index next >

src/java.base/share/classes/java/net/Inet6Address.java

Print this page
@@ -403,10 +403,15 @@
      {
          holder6 = new Inet6AddressHolder();
          initstr (hostName, addr, ifname);
      }
  
+     // use with care
+     Inet6Address (byte[] addr, int scope_id) {
+         holder6 = new Inet6AddressHolder(addr, scope_id, true, null, false);
+     }
+ 
      /**
       * 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}. The call will fail with an
< prev index next >