@Override
  public void writeTo(ProtobufMessageHandler m, Class<?> type, Type genericType,
    Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, Object> httpHeaders,
    OutputStream entityStream) throws IOException, WebApplicationException {
    m.writeProtobufOutput(entityStream);
  }
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