public void deserializeFromByteArray(Message.Builder builder, byte[] array) {
   try {
     builder.mergeFrom(array);
   } catch (InvalidProtocolBufferException e) {
     log.error(e.getMessage());
   }
 }
Example #2
0
 @Override
 public final void addBinary(Binary value) {
   try {
     ProtobufDatumFactory factory = ProtobufDatumFactory.get(dataType.getCode());
     Message.Builder builder = factory.newBuilder();
     builder.mergeFrom(value.getBytes());
     parent.add(factory.createDatum(builder));
   } catch (InvalidProtocolBufferException e) {
     throw new RuntimeException(e);
   }
 }