}
// See if we ended
if (endIndex > -1) {
ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray());
XMLDocument xml = new XMLDocument();
xml.loadInputStream(bis);
if (DEBUG)
System.out.println("want to add note of class " + xml.getDocumentElement().getAttribute("class"));
DXLNote note = DXLNote.create(xml.getDocumentElement());
notes_.add(note);
notesByNoteId_.put(note.getNoteId(), note);
notesByUniversalId_.put(note.getUniversalId(), note);
inNote = false;