public byte[] getCode(int bit) {
        byte[] res;
        assert ((bit == 0) || (bit == 1)) : "getCode: input isn't a bit!";

        if (bit == 0) {
            if (code0 == null) return(null);
            res = new byte[code0.length];
            for (int i = 0 ; i < code0.length ; i++)
                res[i] = code0[i];
        } else {
            if (code1 == null) return(null);
            res = new byte[code1.length];
            for (int i = 0 ; i < code1.length ; i++)
                res[i] = code1[i];
        }
        return (res);
    }