int len = 0;
while ((len = is.read(chars)) > 0) {
String s = new String(chars, 0, len);
// Does it matter that this produces multiple, adjacent text
// nodes? I don't think so...
textNodes.addNode(textDoc.createTextNode(s));
}
is.close();
} catch (Exception e) {
System.out.println("Cannot read " + href);
}