[jdom-interest] Bit masks in ContentFilter

Jason Hunter jhunter at servlets.com
Fri Apr 12 13:14:33 PDT 2002

> Yes, it
> exists in some classes in the JDK such as ImageObserver, but these are
> all old classes written way back in Java 1.0 before the programmers at
> Sun had fuly transitioned to the Java way of doing things. I classify
> this stuff along with named constants in lower case as vestigial relics
> of C.

Playing devil's advocate for a second, they use bitmasks in the brand
spanking New I/O library.  So new it has New in the name.  :-)

Look at the SelectableChannel.register(x, y, OP_ACCEPT) call where
OP_ACCEPT is an int in a bitmask.  All around selectors you need to do
bitmask work.  I don't think Sun's treating it like a relic from C.


More information about the jdom-interest mailing list