public static byte[] toByteArray(TableDescriptor desc) {
    if (desc instanceof ModifyableTableDescriptor) {
      return ((ModifyableTableDescriptor) desc).toByteArray();
    }
    return new ModifyableTableDescriptor(desc).toByteArray();
  }
Returns This instance serialized with pb with pb magic prefix
hbase-client/src/main/java/org/apache/hadoop/hbase/client/TableDescriptorBuilder.java