Refactored BitBuffer.java to include a toString() method to return a string representation of the bit buffer. Removed the print() method as redundant.