public UTF8Row deserialize(ByteBuffer byteBuffer, int size) {
            int pos = byteBuffer.position();
            startRow();
            while (byteBuffer.position() < pos + size) {
                int colId = byteBuffer.getShort();
                SQLType type = columnTypes[colId];
                onColumnIndex(colIdToIndex[colId]);
                switch (type.dataType) {
                    case ColumnType.INT:
                        onIntValue(byteBuffer.getInt());
                        break;
                    case ColumnType.LONG:
                        onLongValue(byteBuffer.getLong());
                        break;
                    case ColumnType.FLOAT:
                        onFloatValue(byteBuffer.getFloat());
                        break;
                    case ColumnType.DOUBLE:
                        onDoubleValue(byteBuffer.getDouble());
                        break;
                    case ColumnType.STRING:
                        int valueSize = byteBuffer.getShort() & 0xFFFF;
                        onStringValue(byteBuffer, valueSize);
                        break;
                    default:
                        throw new IllegalStateException("column type " + type + " is illegal");
                }
            }
            return endRow();
        }
Take size of bytes from buffer and move forward pos.
indexr-segment/src/main/java/io/indexr/segment/rt/UTF8Row.java