public static Selector open () throws IOException

Opens a selector.

The new selector is created by invoking the openSelector method of the system-wide default java.nio.channels.spi.SelectorProvider object.

Returns:  A new selector

Exceptions:
IOException     If an I/O error occurs