public Object parseAndClose(Reader reader, Type dataType) throws IOException { try { // Initialize the parser XmlPullParser parser = Xml.createParser(); parser.setInput(reader); return readObject(parser, dataType); } catch (XmlPullParserException e) { IOException exception = new IOException(); exception.initCause(e); throw exception; } finally { reader.close(); } } }
public Object parseAndClose(InputStream in, Charset charset, Type dataType) throws IOException { try { // Initialize the parser XmlPullParser parser = Xml.createParser(); parser.setInput(in, charset.name()); return readObject(parser, dataType); } catch (XmlPullParserException e) { IOException exception = new IOException(); exception.initCause(e); throw exception; } finally { in.close(); } }
/** * Constructs a new XmlEntity class. */ public XmlEntity() throws XmlPullParserException { super.namespaceDictionary = new XmlNamespaceDictionary(); super.namespaceDictionary.set("s3", "http://s3.amazonaws.com/doc/2006-03-01/"); super.namespaceDictionary.set("", ""); this.xmlPullParser = Xml.createParser(); this.defaultNamespaceDictionary = new XmlNamespaceDictionary(); }
try { Atom.checkContentType(response.contentType); XmlPullParser parser = Xml.createParser(); parser.setInput(content, null); MultiKindFeedParser<T> result = new MultiKindFeedParser<T>();
/** * Constructs a new XmlEntity class. */ public XmlEntity() throws XmlPullParserException { super.namespaceDictionary = new XmlNamespaceDictionary(); super.namespaceDictionary.set("s3", "http://s3.amazonaws.com/doc/2006-03-01/"); super.namespaceDictionary.set("", ""); this.xmlPullParser = Xml.createParser(); this.defaultNamespaceDictionary = new XmlNamespaceDictionary(); }
try { Atom.checkContentType(response.getContentType()); XmlPullParser parser = Xml.createParser(); parser.setInput(content, null); AtomFeedParser<T, E> result =