Methods Summary |
---|
void | characters(char[] ch, int length)
if(mContentHandler != null) {
mContentHandler.characters(ch, 0, length);
}
|
void | endElement(java.lang.String name)
if(mContentHandler != null) {
mContentHandler.endElement("", name, name);
}
|
protected void | finalize()
if (mNativeParser != 0) {
nativeRelease(mNativeParser);
}
|
native int | nativeCreate(java.lang.String encoding)
|
native void | nativeParse(int nativeParser, byte[] ch, int length, boolean isEnd)
|
native void | nativeRelease(int nativeParser)
|
native void | nativeReset(int nativeParser)
|
static native void | nativeStaticInitialize()
|
public void | parse(org.xml.sax.InputSource in)
InputStream byteStream = in.getByteStream();
byte[] buffer = new byte[BUFFER_SIZE];
int length;
// FIXME: nativeParse should throw ParserException but the dalvik
// seems to have problem throwing non-system exceptions from JNI
// code. Use IAE for now and file a bug report for this.
try {
while ((length = byteStream.read(buffer)) != -1) {
nativeParse(mNativeParser, buffer, length, false);
}
nativeParse(mNativeParser, new byte[1], 0, true);
} catch (IllegalArgumentException e) {
throw new ParserException(e);
}
|
public void | reset()
if (mNativeParser != 0) {
nativeReset(mNativeParser);
}
atts.names = null;
atts.values = null;
mContentHandler = null;
|
public void | setContentHandler(org.xml.sax.ContentHandler contentHandler)
mContentHandler = contentHandler;
|
void | startElement(java.lang.String name, java.lang.String[] attrNames, java.lang.String[] attrValues)
atts.names = attrNames;
atts.values = attrValues;
if(mContentHandler != null) {
mContentHandler.startElement("", name, name, atts);
}
|