@Override
  public void writeTo(Object object, Class<?> type, Type genericType, Annotation[] annotations,
    MediaType mediaType, MultivaluedMap<String, Object> httpHeaders, OutputStream outStream)
    throws IOException, WebApplicationException {
    outStream.write(Bytes.toBytes(object.toString()));
  }
An adapter between Jersey and Object.toString(). Hooks up plain text output to the Jersey content
handling framework. Jersey will first call getSize() to learn the number of bytes that will be
sent, then writeTo to perform the actual I/O.
hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/provider/producer/PlainTextMessageBodyProducer.java