src/share/classes/sun/nio/ch/Net.java
Print this page
*** 31,41 ****
import java.util.*;
import java.security.AccessController;
import java.security.PrivilegedAction;
! class Net { // package-private
private Net() { }
// unspecified protocol family
static final ProtocolFamily UNSPEC = new ProtocolFamily() {
--- 31,41 ----
import java.util.*;
import java.security.AccessController;
import java.security.PrivilegedAction;
! public class Net {
private Net() { }
// unspecified protocol family
static final ProtocolFamily UNSPEC = new ProtocolFamily() {
*** 73,83 ****
*/
static boolean canJoin6WithIPv4Group() {
return canJoin6WithIPv4Group0();
}
! static InetSocketAddress checkAddress(SocketAddress sa) {
if (sa == null)
throw new NullPointerException();
if (!(sa instanceof InetSocketAddress))
throw new UnsupportedAddressTypeException(); // ## needs arg
InetSocketAddress isa = (InetSocketAddress)sa;
--- 73,83 ----
*/
static boolean canJoin6WithIPv4Group() {
return canJoin6WithIPv4Group0();
}
! 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,338 ****
}
// 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)
throws IOException
{
bind(UNSPEC, fd, addr, port);
}
--- 328,338 ----
}
// Due to oddities SO_REUSEADDR on windows reuse is ignored
private static native int socket0(boolean preferIPv6, boolean stream, boolean reuse);
! public static void bind(FileDescriptor fd, InetAddress addr, int port)
throws IOException
{
bind(UNSPEC, fd, addr, port);
}
*** 381,391 ****
throws IOException;
private static native InetAddress localInetAddress(FileDescriptor fd)
throws IOException;
! static InetSocketAddress localAddress(FileDescriptor fd)
throws IOException
{
return new InetSocketAddress(localInetAddress(fd), localPort(fd));
}
--- 381,391 ----
throws IOException;
private static native InetAddress localInetAddress(FileDescriptor fd)
throws IOException;
! public static InetSocketAddress localAddress(FileDescriptor fd)
throws IOException
{
return new InetSocketAddress(localInetAddress(fd), localPort(fd));
}