in src/main/java/org/apache/sling/scripting/sightly/impl/html/dom/HtmlParser.java [109:127]
private void parse(final Reader reader)
throws IOException {
try {
this.documentHandler.onStart();
final char[] readBuffer = new char[BUF_SIZE];
int readLen = 0;
while ( (readLen = reader.read(readBuffer)) > 0 ) {
this.update(readBuffer, readLen);
}
this.flushBuffer();
this.documentHandler.onEnd();
} finally {
try {
reader.close();
} catch ( final IOException ignore) {
// ignore
}
}
}