code: public static void encode(Boolean value, byte[] dst, int dstOffset) {
          if (value == null) {
              dst[dstOffset] = NULL_BYTE_HIGH;
          } else {
              dst[dstOffset] = value.booleanValue() ? (byte)128 : (byte)127;
          }
      }
docs: Encodes the given Boolean object into exactly 1 byte.
  
  @param value optional Boolean value to encode
  @param dst destination for encoded bytes
  @param dstOffset offset into destination array