code: public void setNetworkInterface(NetworkInterface netIf)
          throws SocketException {
  
          synchronized (infLock) {
              getImpl().setOption(SocketOptions.IP_MULTICAST_IF2, netIf);
              infAddress = null;
              interfaceSet = true;
          }
      }
docs: Specify the network interface for outgoing multicast datagrams
  sent on this socket.
  
  @param netIf the interface
  @exception SocketException if there is an error in
  the underlying protocol, such as a TCP error.
  @see #getNetworkInterface()
  @since 1.4