also this should be 3 append calls. you can chain them:

 buf.append(getStartNewLine()).append(',').append(getNewLineCount());

if that is cleaner than doing it on 3 separate lines and it doesn't line wrap.