}
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;
}
currentList.add(line);
}
if(!hasFrontMatterEndLine){
log.debug("Maybe a static file: " + sourceEntry.getFile());
throw new NoFrontMatterException(sourceEntry);
}
} catch (IOException e) {
throw new RuntimeException(e);
}finally{
IOUtils.closeQuietly(stream);