Huffman Code in Java