Skip to content

Instantly share code, notes, and snippets.

@shsdev
shsdev / CsvCreator.java
Created April 29, 2014 07:20
Using jackson-dataformat-csv to create CSV file out of POJOs
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.databind.ObjectWriter;
import com.fasterxml.jackson.dataformat.csv.CsvMapper;
import com.fasterxml.jackson.dataformat.csv.CsvSchema;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;