class DittedBitSequence {

	public String getHexString() {
		String uncompressed = this.toString();
		String[] parts = uncompressed.trim().split(" ");
		StringBuilder sb = new StringBuilder();
		for (int i = 0, max = parts.length; i < max; ++i) {
			if (parts[i].contains(".")) {
				sb.append(parts[i]);
				if (i != (max - 1)) {
					sb.append(" ");
				}
				continue;
			}
			String hexByte = Integer.toHexString(Integer.parseUnsignedInt(parts[i].trim(), 2));
			if (hexByte.length() < 2) {
				hexByte = "0" + hexByte;
			}
			sb.append("0x");
			sb.append(hexByte);
			if (i != (max - 1)) {
				sb.append(" ");
			}
		}
		return sb.toString();
	}

	public  DittedBitSequence();
	public  DittedBitSequence(String dittedBitData);
	public  DittedBitSequence(String dittedBitData, boolean hex);
	public  DittedBitSequence(DittedBitSequence op2);
	public  DittedBitSequence(byte[] bytes);
	public  DittedBitSequence(byte[] bytes, byte[] mask);
	public  DittedBitSequence(DittedBitSequence s1, DittedBitSequence s2);

}