fileReader.read(buffer, 0, (int) fileSize);
StringBuffer listing = new StringBuffer();
for (int i = 0; i < errors.length; i++) {
CompilerError error = errors[i];
int start = error.getStartLine();
int end = error.getEndLine();
if (start > 0 && end > 0) {
String before = getString(buffer, start - 1 - linesBefore, start - 1);
String itself = getString(buffer, start, end);
String after = getString(buffer, end + 1, end + 1 + linesAfter);
listing.append("ERROR ").append(i + 1).append(" (").append(error.getFile()).append("):\n");
listing.append("...\n");
listing.append(before);
listing.append("\n// start error (lines ").append(error.getStartLine()).append("-").append(error.getEndLine()).append(") \"").append(error.getMessage()).append("\"\n");
listing.append(itself);
listing.append("\n// end error\n");
listing.append(after);
listing.append("\n...\n");
}