if (headerLines != null) {
String lines = StringUtils.join(headerLines, "\n");
byte[] bytes = lines.getBytes();
InputStream is = new ByteArrayInputStream(bytes);
LineIterator reader = new LineIteratorImpl(new AsciiLineReader(is));
try {
codec.readHeader(reader);
} catch (IOException e) {
log.error(e.getMessage(), e);
}