|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
ch.qos.logback.core.joran.event.SaxEventRecorder
ch.qos.logback.classic.android.ASaxEventRecorder
public class ASaxEventRecorder
SAX event recorder for compressed Android XML resource files. Supports filtering to capture only the sub-events of an event of interest in order to conserve memory usage.
Field Summary |
---|
Fields inherited from class ch.qos.logback.core.joran.event.SaxEventRecorder |
---|
saxEventList |
Constructor Summary | |
---|---|
ASaxEventRecorder(Context context)
Constructor |
Method Summary | |
---|---|
java.util.List<SaxEvent> |
recordEvents(org.xml.sax.InputSource src)
Parses SAX events from a compressed Android XML resource |
void |
setFilter(java.lang.String... names)
Sets a filter so that only sub-elements of a specific element are captured |
Methods inherited from class ch.qos.logback.core.joran.event.SaxEventRecorder |
---|
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, characters, endElement, error, fatalError, getContext, getLocator, getSaxEventList, recordEvents, setContext, setDocumentLocator, startDocument, startElement, warning |
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
---|
endDocument, endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, skippedEntity, startPrefixMapping, unparsedEntityDecl |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ASaxEventRecorder(Context context)
context
- logger contextMethod Detail |
---|
public void setFilter(java.lang.String... names)
For example, if the desired elements were inside
<x><y>
and the input were
<x><y><a/><b/><c/></x></y>
the filter would pass
<a/><b/><c/>
The call in this example would be: setFilter("x", "y")
.
names
- names of elements leading to the target elements;
use null
to disable filtering (capture all events)public java.util.List<SaxEvent> recordEvents(org.xml.sax.InputSource src) throws JoranException
recordEvents
in class SaxEventRecorder
src
- input source pointing to a compressed Android XML resource
JoranException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |