public class NoteReader extends Object
| Modifier and Type | Class and Description |
|---|---|
private static class |
NoteReader.NoteParseMode
Notes can be represented in two XML formats.
|
private class |
NoteReader.Parser
SAX handler to read note information from its XML representation.
|
| Modifier and Type | Field and Description |
|---|---|
private InputSource |
inputSource |
private List<Note> |
parsedNotes |
| Constructor and Description |
|---|
NoteReader(InputStream source)
Initializes the reader with a given InputStream
|
NoteReader(String source)
Initializes the reader with a string as a source
|
| Modifier and Type | Method and Description |
|---|---|
List<Note> |
parse()
Parses the InputStream given to the constructor and returns
the resulting Note objects
|
private final InputSource inputSource
private List<Note> parsedNotes
public NoteReader(InputStream source) throws IOException
source - - InputStream containing Notes XMLIOException - if any I/O error occurspublic NoteReader(String source) throws IOException
source - UTF-8 string containing Notes XML to parseIOException - if any I/O error occurspublic List<Note> parse() throws SAXException, IOException
SAXException - if any SAX parsing error occursIOException - if any I/O error occurs