final OutputStream outputStream = getOutputStream(writeMode);
final OutputStreamWriter writer = charset == null ? new OutputStreamWriter(outputStream) :
new OutputStreamWriter(outputStream, charset);
if (java.util.List.class.isAssignableFrom(beanType)) {
delegateWriter = new CsvListWriter(writer, getCsvPreference());
} else if (java.util.Map.class.isAssignableFrom(beanType)) {
delegateWriter = new CsvMapWriter(writer, getCsvPreference());
} else {
delegateWriter = new CsvBeanWriter(writer, getCsvPreference());
}