public abstract <T> T getOption (SocketOption<T> name) throws IOException

Returns the value of a socket option.

Parameters:
<T>     The type of the socket option value
name     The socket option

Returns:  The value of the socket option. A value of null may be a valid value for some socket options.

Exceptions:
UnsupportedOperationException     If the socket option is not supported by this channel
ClosedChannelException     If this channel is closed
IOException     If an I/O error occurs

See also:
java.net.StandardSocketOptions