src/java.base/share/classes/sun/nio/ch/Net.java
changeset 59000 612c58965775
parent 55375 96c7427456f9
child 59004 84e08e00c29c
equal deleted inserted replaced
58999:6bc29ebe053e 59000:612c58965775
   119      */
   119      */
   120     static boolean canJoin6WithIPv4Group() {
   120     static boolean canJoin6WithIPv4Group() {
   121         return canJoin6WithIPv4Group0();
   121         return canJoin6WithIPv4Group0();
   122     }
   122     }
   123 
   123 
       
   124     /**
       
   125      * Tells whether IPV6_XXX socket options should be used on an IPv6 socket
       
   126      * that is bound to an IPv4 address.
       
   127      */
       
   128     static boolean canUseIPv6OptionsWithIPv4LocalAddress() {
       
   129         return canUseIPv6OptionsWithIPv4LocalAddress0();
       
   130     }
       
   131 
   124     public static InetSocketAddress checkAddress(SocketAddress sa) {
   132     public static InetSocketAddress checkAddress(SocketAddress sa) {
   125         if (sa == null)
   133         if (sa == null)
   126             throw new NullPointerException();
   134             throw new NullPointerException();
   127         if (!(sa instanceof InetSocketAddress))
   135         if (!(sa instanceof InetSocketAddress))
   128             throw new UnsupportedAddressTypeException(); // ## needs arg
   136             throw new UnsupportedAddressTypeException(); // ## needs arg
   432 
   440 
   433     private static native boolean canIPv6SocketJoinIPv4Group0();
   441     private static native boolean canIPv6SocketJoinIPv4Group0();
   434 
   442 
   435     private static native boolean canJoin6WithIPv4Group0();
   443     private static native boolean canJoin6WithIPv4Group0();
   436 
   444 
       
   445     private static native boolean canUseIPv6OptionsWithIPv4LocalAddress0();
       
   446 
   437     static FileDescriptor socket(boolean stream) throws IOException {
   447     static FileDescriptor socket(boolean stream) throws IOException {
   438         return socket(UNSPEC, stream);
   448         return socket(UNSPEC, stream);
   439     }
   449     }
   440 
   450 
   441     static FileDescriptor socket(ProtocolFamily family, boolean stream) throws IOException {
   451     static FileDescriptor socket(ProtocolFamily family, boolean stream) throws IOException {