コード例 #1
0
 /**
  * Constructor. Builds the shared objects used for parsing.
  *
  * @throws XmlPullParserException if error creating parser
  */
 public PullHandler() throws XmlPullParserException {
   XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
   m_parser = factory.newPullParser();
   m_startTag = factory.newStartTag();
   m_endTag = factory.newEndTag();
   m_buffer = new StringBuffer();
 }
コード例 #2
0
 @Override
 public Tweets read(InputStream anInputStream) throws Exception {
   XmlPullParser _p = f.newPullParser();
   _p.setInput(anInputStream, "utf-8");
   return parse(_p);
 }
コード例 #3
0
 public PullParserTweetsReader() throws Exception {
   dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
   f = XmlPullParserFactory.newInstance();
   f.setNamespaceAware(true);
 }