code: private static void oddParity(byte[] bytes) {
          for (int i = 0; i < bytes.length; i++) {
              byte b = bytes[i];
              boolean needsParity = (((b >>> 7) ^ (b >>> 6) ^ (b >>> 5)
                      ^ (b >>> 4) ^ (b >>> 3) ^ (b >>> 2) ^ (b >>> 1)) & 0x01) == 0;
              if (needsParity) {
                  bytes[i] |= (byte) 0x01;
              } else {
                  bytes[i] &= (byte) 0xfe;
              }
          }
      }
docs: Applies odd parity to the given byte array.
  
  @param bytes The data whose parity bits are to be adjusted for
  odd parity.