/** * Copy lines from reader to output * * @param codeReader line reader * @param range range of lines to copy */ private void copyLines(final BufferedReader codeReader, final Range range) throws IOException, SAXException { boolean first = true; String line = codeReader.readLine(); for (int i = 0; line != null; i++) { if (i >= range.start && i <= range.end) { if (first) { first = false; } else { super.characters(XML_NEWLINE, 0, XML_NEWLINE.length); } final char[] ch = line.toCharArray(); super.characters(ch, 0, ch.length); } line = codeReader.readLine(); } }