|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.codehaus.activemq.util.BitArray
Simple BitArray to enable setting multiple boolean values efficently Used instead of BitSet because BitSet does not allow for efficent serialization. Will store up to 64 boolean values
| Field Summary | |
(package private) static int |
BYTE_SIZE
|
(package private) static int |
INT_SIZE
|
(package private) static int |
LONG_SIZE
|
(package private) static int |
SHORT_SIZE
|
| Constructor Summary | |
BitArray()
|
|
| Method Summary | |
boolean |
get(int index)
|
long |
getBits()
|
int |
length()
|
void |
readFromStream(DataInput dataIn)
read the bits from an input stream |
void |
reset()
reset all the bit values to false |
boolean |
set(int index,
boolean flag)
set the boolean value at the index |
void |
writeToStream(DataOutput dataOut)
write the bits to an output stream |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
static final int LONG_SIZE
static final int INT_SIZE
static final int SHORT_SIZE
static final int BYTE_SIZE
| Constructor Detail |
public BitArray()
| Method Detail |
public int length()
public long getBits()
public boolean set(int index,
boolean flag)
index - flag -
public boolean get(int index)
index -
public void reset()
public void writeToStream(DataOutput dataOut)
throws IOException
dataOut -
IOException
public void readFromStream(DataInput dataIn)
throws IOException
dataIn -
IOException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||