public synchronized void parse(Reader reader) throws XmlParseException, IOException { try { XmlPullParser parser = createParser(); parser.setInput(reader); parse(parser); } catch (XmlPullParserException e) { throw new XmlParseException(getParser(), e.getMessage(), e); } }
public synchronized void parse(InputStream is, String enc) throws XmlParseException, IOException { if (is == null) { throw new NullPointerException("InputStream"); } try { XmlPullParser parser = createParser(); parser.setInput(is, enc); parse(parser); } catch (XmlPullParserException e) { throw new XmlParseException(getParser(), e.getMessage()); } }