List<String> contentLines = new ArrayList<String>();
InputStream stream = null;
List<String> currentList = metaLines;
try {
stream = new FileInputStream(sourceEntry.getFile());
LineIterator iterator = IOUtils.lineIterator(stream, "UTF-8");
if(!iterator.hasNext()){
throw new RuntimeException("File not content: " + sourceEntry.getFile());
}
String line = iterator.next();
if(!isFrontMatterStartLine(line, sourceEntry)){
log.debug("Maybe a static file: " + sourceEntry.getFile());
throw new NoFrontMatterException(sourceEntry);
}
boolean hasFrontMatterEndLine = false;
//process headers
while(iterator.hasNext()){
line = iterator.next();
if(isFrontMatterEndLine(line)){
hasFrontMatterEndLine = true;
currentList = contentLines;
continue;
}