[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bitwise operators
On Sat, 22 Feb 2003 19:16:45 -0500 (EST), Henri Yandell was overheard saying:
| Check out java.math.BigInteger.
|
| As well as being 'some kinda big number holder' it's also a great bit
| handler. Not what you'd expect of it from the name.
|
| A hidden secret.
A colleague pointed java.util.BitSet out to me the other day. I don't
know how suitable it is for embedded platforms, but it's very handy
for everyday bit operations. Even though it works like a collection
of booleans, it's stored as bits so you get a minimal memory
footprint, and you get bitwise operations too: and, andNot, or, xor.
After mentioning it to me, I did some research and turned up a recent
JDC Tech Tip that talks about BitSet:
http://developer.java.sun.com/developer/JDCTechTips/2002/tt1203.html
-R
--
Robert Gash, gashalot@gashalot.com
(Web) http://gashalot.com/
(PGP) http://gashalot.com/pgpkeys.txt