当前位置: 首页>>代码示例>>Java>>正文


Java IllegalDataException类代码示例

本文整理汇总了Java中master.flame.danmaku.danmaku.loader.IllegalDataException的典型用法代码示例。如果您正苦于以下问题:Java IllegalDataException类的具体用法?Java IllegalDataException怎么用?Java IllegalDataException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


IllegalDataException类属于master.flame.danmaku.danmaku.loader包,在下文中一共展示了IllegalDataException类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setDanmakuSource

import master.flame.danmaku.danmaku.loader.IllegalDataException; //导入依赖的package包/类
/**
 * 设置弹幕资源,默认资源格式需满足 bilibili 的弹幕文件格式,
 * 配合{@link #setDanmakuCustomParser}来进行自定义弹幕解析方式,{@link #setDanmakuCustomParser}必须先调用
 *
 * @param stream 弹幕资源
 * @return
 */
public IjkPlayerView setDanmakuSource(InputStream stream) {
    if (stream == null) {
        return this;
    }
    if (!mIsEnableDanmaku) {
        throw new RuntimeException("Danmaku is disable, use enableDanmaku() first");
    }
    if (mDanmakuLoader == null) {
        mDanmakuLoader = DanmakuLoaderFactory.create(DanmakuLoaderFactory.TAG_BILI);
    }
    try {
        mDanmakuLoader.load(stream);
    } catch (IllegalDataException e) {
        e.printStackTrace();
    }
    IDataSource<?> dataSource = mDanmakuLoader.getDataSource();
    if (mDanmakuParser == null) {
        mDanmakuParser = new BiliDanmukuParser();
    }
    mDanmakuParser.load(dataSource);
    return this;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:30,代码来源:IjkPlayerView.java

示例2: createParser

import master.flame.danmaku.danmaku.loader.IllegalDataException; //导入依赖的package包/类
private BaseDanmakuParser createParser(InputStream stream) {
    if (stream == null) {
        return new BaseDanmakuParser() {

            @Override
            protected Danmakus parse() {
                return new Danmakus();
            }
        };
    }
    ILoader loader = DanmakuLoaderFactory.create(DanmakuLoaderFactory.TAG_BILI);
    try {
        loader.load(stream);
    } catch (IllegalDataException e) {
        e.printStackTrace();
    }
    BaseDanmakuParser parser = new BiliDanmukuParser();
    IDataSource<?> dataSource = loader.getDataSource();
    parser.load(dataSource);
    return parser;
}
 
开发者ID:lisnstatic,项目名称:live_master,代码行数:22,代码来源:WatchLiveActivity.java

示例3: createParser

import master.flame.danmaku.danmaku.loader.IllegalDataException; //导入依赖的package包/类
/**
 * 创建解析器对象,解析输入流
 *
 * @param stream
 * @return
 */
private BaseDanmakuParser createParser(InputStream stream) {

    if (stream == null) {
        return new BaseDanmakuParser() {

            @Override
            protected Danmakus parse() {
                return new Danmakus();
            }
        };
    }

    ILoader loader = DanmakuLoaderFactory.create(DanmakuLoaderFactory.TAG_BILI);

    try {
        loader.load(stream);
    } catch (IllegalDataException e) {
        e.printStackTrace();
    }
    BaseDanmakuParser parser = new BiliDanmukuParser();
    IDataSource<?> dataSource = loader.getDataSource();
    parser.load(dataSource);
    return parser;

}
 
开发者ID:CarGuo,项目名称:GSYVideoPlayer,代码行数:32,代码来源:DanmakuVideoPlayer.java

示例4: createParser

import master.flame.danmaku.danmaku.loader.IllegalDataException; //导入依赖的package包/类
private BaseDanmakuParser createParser(InputStream stream) {
    if (stream == null) {
        return new BaseDanmakuParser() {
            @Override
            protected Danmakus parse() {
                return new Danmakus();
            }
        };
    }
    ILoader loader = DanmakuLoaderFactory.create(DanmakuLoaderFactory.TAG_BILI);
    try {
        loader.load(stream);
    } catch (IllegalDataException e) {
        e.printStackTrace();
    }
    BaseDanmakuParser parser = new BiliDanmukuParser();
    IDataSource<?> dataSource = loader.getDataSource();
    parser.load(dataSource);
    return parser;

}
 
开发者ID:wuyinlei,项目名称:MyHearts,代码行数:22,代码来源:VideoViewActivity.java

示例5: createParser

import master.flame.danmaku.danmaku.loader.IllegalDataException; //导入依赖的package包/类
private BaseDanmakuParser createParser(InputStream stream) {

        if (stream == null) {
            return new BaseDanmakuParser() {

                @Override
                protected Danmakus parse() {
                    return new Danmakus();
                }
            };
        }

        ILoader loader = DanmakuLoaderFactory.create(DanmakuLoaderFactory.TAG_BILI);

        try {
            loader.load(stream);
        } catch (IllegalDataException e) {
            e.printStackTrace();
        }
        BaseDanmakuParser parser = new BiliDanmukuParser();
        IDataSource<?> dataSource = loader.getDataSource();
        parser.load(dataSource);
        return parser;

    }
 
开发者ID:amikey,项目名称:DanmakuFlameMaster,代码行数:26,代码来源:MainActivity.java

示例6: createParser

import master.flame.danmaku.danmaku.loader.IllegalDataException; //导入依赖的package包/类
private BaseDanmakuParser createParser(InputStream stream) {
    
    if(stream==null){
        return new BaseDanmakuParser() {
            
            @Override
            protected Danmakus parse() {
                return new Danmakus();
            }
        };
    }
        
    
    ILoader loader = DanmakuLoaderFactory.create(DanmakuLoaderFactory.TAG_BILI);

    try {
        loader.load(stream);
    } catch (IllegalDataException e) {
        e.printStackTrace();
    }
    BaseDanmakuParser parser = new BiliDanmukuParser();
    IDataSource<?> dataSource = loader.getDataSource();
    parser.load(dataSource);
    return parser;
}
 
开发者ID:dotcool,项目名称:mvideo,代码行数:26,代码来源:BiliVideoViewActivity.java

示例7: createParser

import master.flame.danmaku.danmaku.loader.IllegalDataException; //导入依赖的package包/类
protected BaseDanmakuParser createParser(InputStream stream) {

    if (stream == null) {
      return new BaseDanmakuParser() {

        @Override protected Danmakus parse() {
          return new Danmakus();
        }
      };
    }

    ILoader loader = DanmakuLoaderFactory.create(DanmakuLoaderFactory.TAG_BILI);

    try {
      loader.load(stream);
    } catch (IllegalDataException e) {
      e.printStackTrace();
    }
    BaseDanmakuParser parser = new BiliDanmukuParser();
    IDataSource<?> dataSource = loader.getDataSource();
    parser.load(dataSource);
    return parser;
  }
 
开发者ID:pkliang,项目名称:gankmaku,代码行数:24,代码来源:BaseDanmakuFragment.java

示例8: load

import master.flame.danmaku.danmaku.loader.IllegalDataException; //导入依赖的package包/类
@Override
public void load(String uri) throws IllegalDataException {
    try {
        dataSource = new JsonStrSource(Uri.parse(uri));
    } catch (Exception e) {
        throw new IllegalDataException(e);
    }
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:9,代码来源:DanmakuLoader.java

示例9: load

import master.flame.danmaku.danmaku.loader.IllegalDataException; //导入依赖的package包/类
public void load(String uri) throws IllegalDataException {
    try {
        this.dataSource = new AndroidFileSource(uri);
    } catch (Throwable e) {
        throw new IllegalDataException(e);
    }
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:8,代码来源:BiliDanmakuLoader.java

示例10: load

import master.flame.danmaku.danmaku.loader.IllegalDataException; //导入依赖的package包/类
public void load(String uri) throws IllegalDataException {
    try {
        this.dataSource = new JSONSource(Uri.parse(uri));
    } catch (Throwable e) {
        throw new IllegalDataException(e);
    }
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:8,代码来源:AcFunDanmakuLoader.java

示例11: load

import master.flame.danmaku.danmaku.loader.IllegalDataException; //导入依赖的package包/类
public void load(String uri) throws IllegalDataException {
    try {            
        dataSource = new AndroidFileSource(uri);
    } catch (Exception e) {
    	throw new IllegalDataException(e);
    }
}
 
开发者ID:lisnstatic,项目名称:live_master,代码行数:8,代码来源:BiliDanmakuLoader.java

示例12: load

import master.flame.danmaku.danmaku.loader.IllegalDataException; //导入依赖的package包/类
@Override
public void load(String uri) throws IllegalDataException {
	try {
		dataSource = new JSONSource(Uri.parse(uri));
	} catch (Exception e) {
		throw new IllegalDataException(e);
	}
}
 
开发者ID:lisnstatic,项目名称:live_master,代码行数:9,代码来源:AcFunDanmakuLoader.java

示例13: createParser

import master.flame.danmaku.danmaku.loader.IllegalDataException; //导入依赖的package包/类
/**
 * 弹幕解析器
 */
private BaseDanmakuParser createParser(String uri) {

    if (uri == null) {
        return new BaseDanmakuParser() {

            @Override
            protected Danmakus parse() {
                return new Danmakus();
            }
        };
    }

    ILoader loader = DanmakuLoaderFactory.create(DanmakuLoaderFactory.TAG_BILI);

    try {
        if(uri == null){
            return null;
        }
        loader.load(uri);
    } catch (IllegalDataException e) {
        e.printStackTrace();
    }
    BaseDanmakuParser parser = new BiliDanmukuParser();
    IDataSource<?> dataSource = loader.getDataSource();
    parser.load(dataSource);
    return parser;

}
 
开发者ID:liucloo,项目名称:ijkPlayer-Danmaku,代码行数:32,代码来源:Damaku.java

示例14: load

import master.flame.danmaku.danmaku.loader.IllegalDataException; //导入依赖的package包/类
public void load(String uri) throws IllegalDataException {
    try {
        dataSource = new AndroidFileSource(uri);
    } catch (Exception e) {
        throw new IllegalDataException(e);
    }
}
 
开发者ID:liucloo,项目名称:ijkPlayer-Danmaku,代码行数:8,代码来源:BiliDanmakuLoader.java

示例15: createParser

import master.flame.danmaku.danmaku.loader.IllegalDataException; //导入依赖的package包/类
public static BaseDanmakuParser createParser(InputStream stream) {

        if (stream == null) {
            return new BaseDanmakuParser() {

                @Override
                protected Danmakus parse() {
                    return new Danmakus();
                }
            };
        }

//        ILoader loader = DanmakuLoaderFactory.create(DanmakuLoaderFactory.TAG_BILI);
        ILoader loader = DanmakuLoaderFactory.create(DanmakuLoaderFactory.TAG_ACFUN);

        try {
            loader.load(stream);
        } catch (IllegalDataException e) {
            e.printStackTrace();
        }
//        BaseDanmakuParser parser = new BiliDanmukuParser();
        BaseDanmakuParser parser = new AcFunDanmakuParser();
        IDataSource<?> dataSource = loader.getDataSource();
        parser.load(dataSource);

        return parser;
    }
 
开发者ID:succlz123,项目名称:BlueBoard,代码行数:28,代码来源:DanmakuHelper.java


注:本文中的master.flame.danmaku.danmaku.loader.IllegalDataException类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。