Class BitBlock

java.lang.Object
   |
   +----Block
           |
           +----BitBlock

public class BitBlock
extends Block
Author:
Ray Ontko

Constructor Index

 o BitBlock(short)
Construct a bit block of the specified size in bytes.

Method Index

 o isBitSet(int)
Checks to see if the specified bit of the block is set (1) or reset (0).
 o resetBit(int)
Sets the specified bit of the block to 0 (false).
 o setBit(int)
Set a specified bit to 1 (true).
 o setBit(int, boolean)
Set a specifed bit to a specified boolean value.

Constructors

 o BitBlock
 public BitBlock(short blockSize)
Construct a bit block of the specified size in bytes.

Parameters:
blockSize - the size of the block in bytes

Methods

 o setBit
 public void setBit(int whichBit)
Set a specified bit to 1 (true).

Parameters:
whichBit - the bit to set
 o 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
 o 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.
 o resetBit
 public void resetBit(int whichBit)
Sets the specified bit of the block to 0 (false).

Parameters:
whichBit - bit to set to 0 (false).