Java 类java.nio.channels.AlreadyBoundException 实例源码

项目:j2objc    文件:DatagramChannelImpl.java   
/** @hide Until ready for a public API change */
@Override
synchronized public DatagramChannel bind(SocketAddress local) throws IOException {
    checkOpen();
    if (isBound) {
        throw new AlreadyBoundException();
    }

    if (local == null) {
        local = new InetSocketAddress(Inet4Address.ANY, 0);
    } else if (!(local instanceof InetSocketAddress)) {
        throw new UnsupportedAddressTypeException();
    }

    InetSocketAddress localAddress = (InetSocketAddress) local;
    IoBridge.bind(fd, localAddress.getAddress(), localAddress.getPort());
    onBind(true /* updateSocketState */);
    return this;
}
项目:j2objc    文件:SocketChannelImpl.java   
/** @hide Until ready for a public API change */
@Override
synchronized public final SocketChannel bind(SocketAddress local) throws IOException {
    if (!isOpen()) {
        throw new ClosedChannelException();
    }
    if (isBound) {
        throw new AlreadyBoundException();
    }

    if (local == null) {
        local = new InetSocketAddress(Inet4Address.ANY, 0);
    } else if (!(local instanceof InetSocketAddress)) {
        throw new UnsupportedAddressTypeException();
    }

    InetSocketAddress localAddress = (InetSocketAddress) local;
    IoBridge.bind(fd, localAddress.getAddress(), localAddress.getPort());
    onBind(true /* updateSocketState */);
    return this;
}
项目:j2objc    文件:ServerSocketChannelImpl.java   
/** @hide Until ready for a public API change */
@Override
public final ServerSocketChannel bind(SocketAddress localAddr, int backlog) throws IOException {
    if (!isOpen()) {
        throw new ClosedChannelException();
    }
    if (socket.isBound()) {
        throw new AlreadyBoundException();
    }
    if (localAddr != null && !(localAddr instanceof InetSocketAddress)) {
        throw new UnsupportedAddressTypeException();
    }

    socket.bind(localAddr, backlog);
    return this;
}
项目:OpenJSharp    文件:SctpNet.java   
static boolean throwAlreadyBoundException() throws IOException {
    throw new AlreadyBoundException();
}
项目:jdk8u-jdk    文件:SctpNet.java   
static boolean throwAlreadyBoundException() throws IOException {
    throw new AlreadyBoundException();
}
项目:openjdk-jdk10    文件:SctpNet.java   
static boolean throwAlreadyBoundException() throws IOException {
    throw new AlreadyBoundException();
}
项目:openjdk9    文件:SctpNet.java   
static boolean throwAlreadyBoundException() throws IOException {
    throw new AlreadyBoundException();
}
项目:jdk8u_jdk    文件:SctpNet.java   
static boolean throwAlreadyBoundException() throws IOException {
    throw new AlreadyBoundException();
}
项目:lookaside_java-1.8.0-openjdk    文件:SctpNet.java   
static boolean throwAlreadyBoundException() throws IOException {
    throw new AlreadyBoundException();
}
项目:infobip-open-jdk-8    文件:SctpNet.java   
static boolean throwAlreadyBoundException() throws IOException {
    throw new AlreadyBoundException();
}
项目:jdk8u-dev-jdk    文件:SctpNet.java   
static boolean throwAlreadyBoundException() throws IOException {
    throw new AlreadyBoundException();
}
项目:jdk7-jdk    文件:SctpNet.java   
static boolean throwAlreadyBoundException() throws IOException {
    throw new AlreadyBoundException();
}
项目:openjdk-source-code-learn    文件:SctpNet.java   
static boolean throwAlreadyBoundException() throws IOException {
    throw new AlreadyBoundException();
}
项目:OLD-OpenJDK8    文件:SctpNet.java   
static boolean throwAlreadyBoundException() throws IOException {
    throw new AlreadyBoundException();
}
项目:openjdk-jdk7u-jdk    文件:SctpNet.java   
static boolean throwAlreadyBoundException() throws IOException {
    throw new AlreadyBoundException();
}
项目:openjdk-icedtea7    文件:SctpNet.java   
static boolean throwAlreadyBoundException() throws IOException {
    throw new AlreadyBoundException();
}