Class BitBlock
java.lang.Object
|
+----Block
|
+----BitBlock
- public class BitBlock
- extends Block
- Author:
- Ray Ontko
-
BitBlock(short)
- Construct a bit block of the specified size in bytes.
-
isBitSet(int)
- Checks to see if the specified bit of the block is set (1) or
reset (0).
-
resetBit(int)
- Sets the specified bit of the block to 0 (false).
-
setBit(int)
- Set a specified bit to 1 (true).
-
setBit(int, boolean)
- Set a specifed bit to a specified boolean value.
BitBlock
public BitBlock(short blockSize)
- Construct a bit block of the specified size in bytes.
- Parameters:
- blockSize - the size of the block in bytes
setBit
public void setBit(int whichBit)
- Set a specified bit to 1 (true).
- Parameters:
- whichBit - the bit to set
setBit
public void setBit(int whichBit,
boolean value)
- Set a specifed bit to a specified boolean value.
- Parameters:
- whichBit - the bit to set
- value - the value to which the bit should be set
isBitSet
public boolean isBitSet(int whichBit)
- Checks to see if the specified bit of the block is set (1) or
reset (0).
- Parameters:
- whichBit - the bit to check.
- Returns:
- true if set; false if reset.
resetBit
public void resetBit(int whichBit)
- Sets the specified bit of the block to 0 (false).
- Parameters:
- whichBit - bit to set to 0 (false).