private static String serializeConfiguration(Configuration conf) throws IOException {
    // write the configuration out to the data stream
    ByteArrayOutputStream bos = new ByteArrayOutputStream();
    DataOutputStream dos = new DataOutputStream(bos);
    conf.writeXml(dos);
    dos.flush();
    byte[] data = bos.toByteArray();
    return Bytes.toString(data);
  }
Write the configuration to a String
@param conf to write
@return String representation of that configuration
hbase-server/src/main/java/org/apache/hadoop/hbase/constraint/Constraints.java