class CsvProcessor implements FileProcessor {

    @Override
    public void importBeans(Class<?> clazz, Object[] beans, String filePath) throws IOException {
        List<FieldDesc> list = processeCache.getFieldDescs(clazz);
        Assert.assertTrue(CollectionUtil.isNotEmpty(list), "FieldDesc is not empty");

        List<String> datas = CollectionUtil.createArrayList(beans.length + 1);
        List<String> titles = processeCache.getTitles(clazz);
        if (CollectionUtil.isNotEmpty(titles)) {
            datas.add(CsvUtil.toCsvString(titles));
        }

        for (Object bean : beans) {
            datas.add(toCsvLine(list, bean));
        }

        WriterUtil.writeLinesAndClose(filePath, datas, GBK);

    }

}