Java code for LDPC encoder