本文整理汇总了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();
}
}
示例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();
}
}
示例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();
}
}