@Override public void readFields(final DataInput in) throws IOException { ClientProtos.Result protosResult = ClientProtos.Result.parseDelimitedFrom(DataInputInputStream.from(in)); int size = in.readInt(); if(size < 0) { throw new IOException("Invalid size " + size); } Cell[] kvs = new Cell[size]; for (int i = 0; i < kvs.length; i++) { kvs[i] = KeyValue.create(in); } result = ProtobufUtil.toResult(protosResult, CellUtil.createCellScanner(kvs)); } @Override
@Override public void readFields(final DataInput in) throws IOException { ClientProtos.MutationProto putProto = ClientProtos.MutationProto.parseDelimitedFrom(DataInputInputStream.from(in)); int size = in.readInt(); if(size < 0) { throw new IOException("Invalid size " + size); } Cell[] kvs = new Cell[size]; for (int i = 0; i < kvs.length; i++) { kvs[i] = KeyValue.create(in); } put = ProtobufUtil.toPut(putProto, CellUtil.createCellScanner(kvs)); } @Override
@Override public void readFields(final DataInput in) throws IOException { ClientProtos.MutationProto putProto = ClientProtos.MutationProto.parseDelimitedFrom(DataInputInputStream.from(in)); int size = in.readInt(); if(size < 0) { throw new IOException("Invalid size " + size); } Cell[] kvs = new Cell[size]; for (int i = 0; i < kvs.length; i++) { kvs[i] = KeyValue.create(in); } put = ProtobufUtil.toPut(putProto, CellUtil.createCellScanner(kvs)); } @Override
@Override public void readFields(final DataInput in) throws IOException { ClientProtos.Result protosResult = ClientProtos.Result.parseDelimitedFrom(DataInputInputStream.from(in)); int size = in.readInt(); if(size < 0) { throw new IOException("Invalid size " + size); } Cell[] kvs = new Cell[size]; for (int i = 0; i < kvs.length; i++) { kvs[i] = KeyValue.create(in); } result = ProtobufUtil.toResult(protosResult, CellUtil.createCellScanner(kvs)); } @Override