File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes BitSet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Badass: Making Users Awesome this week in the Game Development forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "BitSet" Watch "BitSet" New topic


Supraja Kannaiyan
Ranch Hand

Joined: Mar 09, 2007
Posts: 41
Can somebody explain how the bitset works?

How to convert string(Values like AAAA) to BitSet?
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 41531
What did you learn when you read the BitSet(←link) documentation?
Matthew Brown

Joined: Apr 06, 2010
Posts: 4518

A BitSet maps integers to boolean values. It does this in a particularly efficient way (you could read Bit array for some of the theory behind it).

As such, I don't know what you mean by "convert a string to a bitmap". There's no natural correspondance between them, so you're going to have to define what the string means, and what the translation should mean.
I agree. Here's the link:
subject: BitSet