@Override
  public long getSize(Object object, Class<?> type, Type genericType, Annotation[] annotations,
    MediaType mediaType) {
    // deprecated by JAX-RS 2.0 and ignored by Jersey runtime
    return -1;
  }
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