Android Open Source - M3UPlayer M3 U File






From Project

Back to project page M3UPlayer.

License

The source code is released under:

Apache License

If you think the Android project M3UPlayer 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.iptv.parser;
/*from  w  w  w. ja  v  a 2s.  c o m*/
import java.util.LinkedList;
import java.util.List;

/**
 * This class describes a .m3u file.
 * 
 * @author Ke
 */
public class M3UFile {
  private M3UHead mHeader;
  private List<M3UItem> mItems;

  protected M3UFile() {
    mItems = new LinkedList<M3UItem>();
  }

  public void setHeader(M3UHead header) {
    mHeader = header;
  }

  public M3UHead getHeader() {
    return mHeader;
  }

  public boolean addItem(M3UItem item) {
    return mItems.add(item);
  }

  public boolean addItems(List<M3UItem> items) {
    return mItems.addAll(items);
  }

  public List<M3UItem> getItems() {
    return mItems;
  }

  @Override
  public String toString() {
    StringBuffer sb = new StringBuffer();
    if (mHeader != null) {
      sb.append(mHeader.toString());
    } else {
      sb.append("No header");
    }
    sb.append('\n');
    for (M3UItem item : mItems) {
      sb.append(item.toString());
      sb.append('\n');
    }
    return sb.toString();
  }
}




Java Source Code List

com.iptv.parser.M3UFile.java
com.iptv.parser.M3UHandler.java
com.iptv.parser.M3UHead.java
com.iptv.parser.M3UItem.java
com.iptv.parser.M3UParser.java
com.iptv.parser.M3UToolSet.java
com.iptv.parser.package-info.java
com.iptv.player.Player.java
com.iptv.utils.BaseActivity.java
com.iptv.utils.FileBrowser.java
com.iptv.utils.Interlude.java
com.iptv.utils.MessageBox.java
com.iptv.utils.SystemProperties.java