@Override
  public long getSize(ProtobufMessageHandler m, 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 ProtobufMessageHandler implementors. Hooks up protobuf output
producing methods 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/ProtobufMessageBodyProducer.java