|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.archive.wayback.util.BitArray
public class BitArray
| Constructor Summary | |
|---|---|
BitArray(byte[] array)
Construct a new BitArray using argument as initial values. |
|
BitArray(ByteBuffer bb)
Construct a new BitArray holding at least n bits |
|
BitArray(int n)
Construct a new BitArray holding at least n bits |
|
| Method Summary | |
|---|---|
boolean |
get(int i)
|
ByteBuffer |
getByteBuffer()
|
byte[] |
getBytes()
|
void |
set(int i,
boolean value)
set the i'th bit to 1 or 0 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BitArray(int n)
n - number of bits to holdpublic BitArray(byte[] array)
array - byte array of initial valuespublic BitArray(ByteBuffer bb)
bb - number of bits to hold| Method Detail |
|---|
public byte[] getBytes()
public ByteBuffer getByteBuffer()
public boolean get(int i)
i - index of bit to test
public void set(int i,
boolean value)
i - bit number to setvalue - if true, the bit is set to 1, otherwise it is set to 0
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||