public class NoteReader extends java.lang.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 org.xml.sax.InputSource |
inputSource |
private java.util.List<Note> |
parsedNotes |
| Constructor and Description |
|---|
NoteReader(java.io.InputStream source)
Initializes the reader with a given InputStream
|
NoteReader(java.lang.String source)
Initializes the reader with a string as a source
|
| Modifier and Type | Method and Description |
|---|---|
java.util.List<Note> |
parse()
Parses the InputStream given to the constructor and returns
the resulting Note objects
|
private org.xml.sax.InputSource inputSource
private java.util.List<Note> parsedNotes
public NoteReader(java.io.InputStream source) throws java.io.IOException
source - - InputStream containing Notes XMLjava.io.IOExceptionpublic NoteReader(java.lang.String source) throws java.io.IOException
source - UTF-8 string containing Notes XML to parsejava.io.IOException