@Override public Result deserialize(Result mutation) throws IOException { int totalBuffer = in.readInt(); if (totalBuffer == 0) { return Result.EMPTY_RESULT; } byte[] buf = new byte[totalBuffer]; readChunked(in, buf, 0, totalBuffer); List<Cell> kvs = new ArrayList<>(); int offset = 0; while (offset < totalBuffer) { int keyLength = Bytes.toInt(buf, offset); offset += Bytes.SIZEOF_INT; kvs.add(new KeyValue(buf, offset, keyLength)); offset += keyLength; } return Result.create(kvs); }
@Override public Result deserialize(Result mutation) throws IOException { int totalBuffer = in.readInt(); if (totalBuffer == 0) { return Result.EMPTY_RESULT; } byte[] buf = new byte[totalBuffer]; readChunked(in, buf, 0, totalBuffer); List<Cell> kvs = new ArrayList<>(); int offset = 0; while (offset < totalBuffer) { int keyLength = Bytes.toInt(buf, offset); offset += Bytes.SIZEOF_INT; kvs.add(new KeyValue(buf, offset, keyLength)); offset += keyLength; } return Result.create(kvs); }
@Override public Result deserialize(Result mutation) throws IOException { int totalBuffer = in.readInt(); if (totalBuffer == 0) { return Result.EMPTY_RESULT; } byte[] buf = new byte[totalBuffer]; readChunked(in, buf, 0, totalBuffer); List<Cell> kvs = new ArrayList<>(); int offset = 0; while (offset < totalBuffer) { int keyLength = Bytes.toInt(buf, offset); offset += Bytes.SIZEOF_INT; kvs.add(new KeyValue(buf, offset, keyLength)); offset += keyLength; } return Result.create(kvs); }
@Override public Result deserialize(Result mutation) throws IOException { int totalBuffer = in.readInt(); if (totalBuffer == 0) { return Result.EMPTY_RESULT; } byte[] buf = new byte[totalBuffer]; readChunked(in, buf, 0, totalBuffer); List<Cell> kvs = new ArrayList<Cell>(); int offset = 0; while (offset < totalBuffer) { int keyLength = Bytes.toInt(buf, offset); offset += Bytes.SIZEOF_INT; kvs.add(new KeyValue(buf, offset, keyLength)); offset += keyLength; } return Result.create(kvs); }