ByteArrayOutputStream stream = new ByteArrayOutputStream();
CsvWriter writer = new CsvWriter(stream, ',', Charset
.forName("ISO-8859-1"));
writer.write("1");
writer.endRecord();
writer.writeComment("blah");
writer.write("2");
writer.endRecord();
writer.close();
buffer = stream.toByteArray();