Android Open Source - wxalert Base Feed Parser






From Project

Back to project page wxalert.

License

The source code is released under:

Apache License

If you think the Android project wxalert listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.creatuity.wxalert;
//  w ww . jav a2  s . co m
import java.io.IOException;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;

public abstract class BaseFeedParser implements FeedParser {

  // names of the XML tags
  static final String CHANNEL = "channel";
  static final String PUB_DATE = "pubDate";
  static final  String DESCRIPTION = "description";
  static final  String LINK = "link";
  static final  String TITLE = "title";
  static final  String ITEM = "item";
  
  private final URL feedUrl;

  protected BaseFeedParser(String feedUrl){
    try {
      this.feedUrl = new URL(feedUrl);
    } catch (MalformedURLException e) {
      throw new RuntimeException(e);
    }
  }

  protected InputStream getInputStream() {
    try {
      return feedUrl.openConnection().getInputStream();
    } catch (IOException e) {
      throw new RuntimeException(e);
    }
  }
}




Java Source Code List

com.creatuity.wxalert.Alert.java
com.creatuity.wxalert.AndroidSaxFeedParser.java
com.creatuity.wxalert.BaseFeedParser.java
com.creatuity.wxalert.DomFeedParser.java
com.creatuity.wxalert.FeedParserFactory.java
com.creatuity.wxalert.FeedParser.java
com.creatuity.wxalert.MessageList.java
com.creatuity.wxalert.Message.java
com.creatuity.wxalert.ParserType.java
com.creatuity.wxalert.RssHandler.java
com.creatuity.wxalert.SaxFeedParser.java
com.creatuity.wxalert.WeatherAlert.java
com.creatuity.wxalert.XmlPullFeedParser.java