src/share/classes/sun/nio/ch/Net.java

Print this page

        

@@ -31,11 +31,11 @@
 import java.util.*;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 
 
-class Net {                                             // package-private
+public class Net {
 
     private Net() { }
 
     // unspecified protocol family
     static final ProtocolFamily UNSPEC = new ProtocolFamily() {

@@ -73,11 +73,11 @@
      */
     static boolean canJoin6WithIPv4Group() {
         return canJoin6WithIPv4Group0();
     }
 
-    static InetSocketAddress checkAddress(SocketAddress sa) {
+    public static InetSocketAddress checkAddress(SocketAddress sa) {
         if (sa == null)
             throw new NullPointerException();
         if (!(sa instanceof InetSocketAddress))
             throw new UnsupportedAddressTypeException(); // ## needs arg
         InetSocketAddress isa = (InetSocketAddress)sa;

@@ -328,11 +328,11 @@
     }
 
     // Due to oddities SO_REUSEADDR on windows reuse is ignored
     private static native int socket0(boolean preferIPv6, boolean stream, boolean reuse);
 
-    static void bind(FileDescriptor fd, InetAddress addr, int port)
+    public static void bind(FileDescriptor fd, InetAddress addr, int port)
         throws IOException
     {
         bind(UNSPEC, fd, addr, port);
     }
 

@@ -381,11 +381,11 @@
         throws IOException;
 
     private static native InetAddress localInetAddress(FileDescriptor fd)
         throws IOException;
 
-    static InetSocketAddress localAddress(FileDescriptor fd)
+    public static InetSocketAddress localAddress(FileDescriptor fd)
         throws IOException
     {
         return new InetSocketAddress(localInetAddress(fd), localPort(fd));
     }