NIO编程中的SelectionKey.interestOps方法中的逻辑运算是什么意思? 基础不太好。看了半天没弄明白是什么意思。代码如下sk.interestOps(sk.interestOps()& ~SelectionKey.OP_READ);sk.interestOps(sk.interestOps()| SelectionKey.OP_READ);多谢回复。[该贴被sdslnmd于2012-08-01 10:31修改过]
不知道这个链接是否可以帮到你:http://stackoverflow.com/questions/2880443/nio-best-practices-selectablechannel-and-interestops