public void unpackMessage(Message.Builder builder) {
    int size = data.getInt();
    byte[] bytes = new byte[size];
    data.get(bytes);
    try {
      builder.mergeFrom(bytes);
    } catch (InvalidProtocolBufferException e) {
      LOG.log(Level.SEVERE, "InvalidProtocolBufferException: ", e);
    }
  }
public void unpackMessage ( Message . Builder builder ) { int size = data . getInt ( ) ; byte [ ] bytes = new byte [ size ] ; data . get ( bytes ) ; try { builder . mergeFrom ( bytes ) ; } catch ( InvalidProtocolBufferException e ) { LOG . log ( Level . SEVERE , "InvalidProtocolBufferException: " , e ) ; } }
TODO:- Multiple copies going on here.