private class NoteReader.Parser extends DefaultHandler
Modifier and Type | Field and Description |
---|---|
private StringBuffer |
buffer |
private Date |
commentCreateDate |
private Boolean |
commentIsNew |
(package private) String |
commentText |
private long |
commentUid |
private String |
commentUsername |
private SimpleDateFormat |
ISO8601_FORMAT |
private SimpleDateFormat |
NOTE_DATE_FORMAT |
private NoteComment.Action |
noteAction |
private List<Note> |
notes |
private NoteReader.NoteParseMode |
parseMode |
private Note |
thisNote |
Modifier | Constructor and Description |
---|---|
private |
NoteReader.Parser() |
Modifier and Type | Method and Description |
---|---|
void |
characters(char[] ch,
int start,
int length) |
void |
endDocument() |
void |
endElement(String namespaceURI,
String localName,
String qName) |
private Date |
parseDate(SimpleDateFormat sdf,
String dateStr)
Convenience method to handle the date parsing try/catch.
|
void |
startElement(String uri,
String localName,
String qName,
Attributes attrs) |
endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
private final SimpleDateFormat ISO8601_FORMAT
private final SimpleDateFormat NOTE_DATE_FORMAT
private NoteReader.NoteParseMode parseMode
private StringBuffer buffer
private long commentUid
private String commentUsername
private NoteComment.Action noteAction
private Date commentCreateDate
private Boolean commentIsNew
String commentText
private NoteReader.Parser()
public void characters(char[] ch, int start, int length) throws SAXException
characters
in interface ContentHandler
characters
in class DefaultHandler
SAXException
public void startElement(String uri, String localName, String qName, Attributes attrs) throws SAXException
startElement
in interface ContentHandler
startElement
in class DefaultHandler
SAXException
public void endElement(String namespaceURI, String localName, String qName)
endElement
in interface ContentHandler
endElement
in class DefaultHandler
public void endDocument() throws SAXException
endDocument
in interface ContentHandler
endDocument
in class DefaultHandler
SAXException
private Date parseDate(SimpleDateFormat sdf, String dateStr)
dateStr
- - String to parse