code: public static SocketChannel open(SocketAddress remote)
          throws IOException
      {
          SocketChannel sc = open();
          try {
              sc.connect(remote);
          } catch (Throwable x) {
              try {
                  sc.close();
              } catch (Throwable suppressed) {
                  x.addSuppressed(suppressed);
              }
              throw x;
          }
          assert sc.isConnected();
          return sc;
      }
docs: Opens a socket channel and connects it to a remote address.
  
  <p> This convenience method works as if by invoking the {@link #open()}
  method, invoking the {@link #connect(SocketAddress) connect} method upon
  the resulting socket channel, passing it <tt>remote</tt>, and then
  returning that channel.  </p>
  
  @param  remote
  The remote address to which the new channel is to be connected
  
  @return  A new, and connected, socket channel
  
  @throws  AsynchronousCloseException
  If another thread closes this channel
  while the connect operation is in progress
  
  @throws  ClosedByInterruptException
  If another thread interrupts the current thread
  while the connect operation is in progress, thereby
  closing the channel and setting the current thread's
  interrupt status
  
  @throws  UnresolvedAddressException
  If the given remote address is not fully resolved
  
  @throws  UnsupportedAddressTypeException
  If the type of the given remote address is not supported
  
  @throws  SecurityException
  If a security manager has been installed
  and it does not permit access to the given remote endpoint
  
  @throws  IOException
  If some other I/O error occurs