Code example for SocketException

0
    protected void implConfigureBlocking(boolean blockMode) throws IOException {
        synchronized (blockingLock()) {
            networkSystem.setNonBlocking(fd, !blockMode);
        } 
    } 
 
    /* 
     * Get the fd. 
     */ 
    public FileDescriptor getFD() {
        return fd;
    } 
 
    /* 
     * Adapter classes for internal socket. 
     */ 
    private static class SocketAdapter extends Socket {
 
        SocketChannelImpl channel;
 
        SocketImpl socketImpl;