LinkedList<Cell> cells = new LinkedList<>();
BasicBSONList cols = (BasicBSONList) row;
Iterator<Field> fieldsIter = fields.iterator();
for (Object col : cols) {
byte[] val = col != null ? (byte[]) col : null;
Field field = fieldsIter.next();
FieldType ft = field.getType();
cells.add(new Cell(field.getName(), ft.convert(val), ft.javaType));
}
rowList.add(new Row(cells));
}
return rowList;
}