code: public static byte booleansToByte(boolean[] array) {
          if (array != null && array.length > 0) {
              byte b = 0;
              for (int i = 0; i <= 7; i++) {
                  if (array[i]) {
                      int nn = (1 << (7 - i));
                      b += nn;
                  }
              }
              return b;
          }
          return 0;
      }
docs: 将一个长度为8的boolean数组（每bit代表一个boolean值）转换为byte
  
  @param array boolean数组
  @return byte