java.lang.Object
org.seppiko.commons.utils.Bits
A Bits with byte size.
- Author:
- Leonard Woo
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Bits
public Bits()Bits constructor -
Bits
Initializes a newly createdBitsobject so that it represents the same sequence of characters as the argument.- Parameters:
original- ABits
-
-
Method Details
-
putBit
public void putBit(boolean value, int position) Put a bit with position0 1 2 3 4 5 6 7 +--+--+--+--+--+--+--+--+ | 1 byte | +--+--+--+--+--+--+--+--+- Parameters:
value- bit valueposition- this bit position
-
putByte
public void putByte(byte b) Put a byte to bit- Parameters:
b- byte
-
getBits
public boolean[] getBits()Get a bits with boolean array- Returns:
- boolean array
-
getByte
public byte getByte()Get this bits byte- Returns:
- a byte
-
clean
public void clean()Clean bits value.
-