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


Java AbsTransport.isPotentialPlaylist方法代码示例

本文整理汇总了Java中net.sourceforge.servestream.transport.AbsTransport.isPotentialPlaylist方法的典型用法代码示例。如果您正苦于以下问题:Java AbsTransport.isPotentialPlaylist方法的具体用法?Java AbsTransport.isPotentialPlaylist怎么用?Java AbsTransport.isPotentialPlaylist使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.sourceforge.servestream.transport.AbsTransport的用法示例。


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

示例1: processUri

import net.sourceforge.servestream.transport.AbsTransport; //导入方法依赖的package包/类
private void processUri() {
	AbsTransport transport = TransportFactory.getTransport(getUri().getProtocol());
	transport.setUri(getUri());
	
	try {
		transport.connect();
	
		if (transport.getContentType() == null) {
			mAction = URL_ACTION_UNDETERMINED;
		} else if (transport.getContentType().contains("text/html")) {
			mAction = URL_ACTION_BROWSE;
		} else {
			mAction = URL_ACTION_PLAY;
			if (transport.isPotentialPlaylist()) {
				mList = MusicUtils.getFilesInPlaylist(mContext, getUri().getScrubbedUri().toString(), transport.getContentType(), transport.getConnection());
			} else {
				mList = MusicUtils.storeFile(mContext, getUri().getScrubbedUri().toString());
			}
		}
	} catch (Exception e) {
		e.printStackTrace();
		mAction = URL_ACTION_UNDETERMINED;
	} finally {
		transport.close();
	}
}
 
开发者ID:minstrelsy,项目名称:servestream,代码行数:27,代码来源:DetermineActionTask.java

示例2: processUri

import net.sourceforge.servestream.transport.AbsTransport; //导入方法依赖的package包/类
private void processUri() {
	AbsTransport transport = TransportFactory.getTransport(getUri().getProtocol());
	transport.setUri(getUri());
	
	try {
		transport.connect();
	
		if (transport.getContentType() == null) {
			mAction = URL_ACTION_UNDETERMINED;
		} else if (transport.getContentType().contains("text/html")) {
			mAction = URL_ACTION_BROWSE;
		} else {
			mAction = URL_ACTION_PLAY;
			if (transport.isPotentialPlaylist()) {
				mList = MusicUtils.getFilesInPlaylist(mContext, getUri().getScrubbedUri().toString(), transport.getContentType(), transport.getConnection());
			} else {
				mList = MusicUtils.storeFile(mContext, getUri().getScrubbedUri().toString());
			}
		}
	} catch (ProtocolException ex) {
		// Ugly workaround to avoid HttpURLConnection issues in KitKat
		if (ex.getMessage().equals("Unexpected status line: ICY 200 OK")) {
			mAction = URL_ACTION_PLAY;
			mList = MusicUtils.storeFile(mContext, getUri().getScrubbedUri().toString());
		} else {
			mAction = URL_ACTION_UNDETERMINED;
		}
	} catch (Exception e) {
		e.printStackTrace();
		mAction = URL_ACTION_UNDETERMINED;
	} finally {
		transport.close();
	}
}
 
开发者ID:wseemann,项目名称:ServeStream,代码行数:35,代码来源:DetermineActionTask.java

示例3: processUri

import net.sourceforge.servestream.transport.AbsTransport; //导入方法依赖的package包/类
private void processUri() {
	AbsTransport transport = TransportFactory.getTransport(getUri().getProtocol());
	transport.setUri(getUri());

	try {
		transport.connect();

		if (transport.getContentType() == null) {
			mAction = URL_ACTION_UNDETERMINED;
		} else if (transport.getContentType().contains("text/html")) {
			mAction = URL_ACTION_BROWSE;
		} else {
			mAction = URL_ACTION_PLAY;
			if (transport.isPotentialPlaylist()) {
				Log.d("DETERMINESHIT", getUri().toString());
				Log.d("DETERMINESHIT", getUri().getScrubbedUri().toString());
				mList = MusicUtils.getFilesInPlaylist(mContext, getUri().getScrubbedUri().toString(), transport.getContentType(), transport.getConnection());
			} else {
				mList = MusicUtils.storeFile(mContext, getUri().getScrubbedUri().toString());
			}
		}
	} catch (Exception e) {
		e.printStackTrace();
		mAction = URL_ACTION_UNDETERMINED;
	} finally {
		transport.close();
	}
}
 
开发者ID:abeluck,项目名称:radioplayer,代码行数:29,代码来源:DetermineActionTask.java


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