本文整理汇总了Java中net.sourceforge.servestream.transport.HTTPS类的典型用法代码示例。如果您正苦于以下问题:Java HTTPS类的具体用法?Java HTTPS怎么用?Java HTTPS使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
HTTPS类属于net.sourceforge.servestream.transport包,在下文中一共展示了HTTPS类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getMediaPlayer
import net.sourceforge.servestream.transport.HTTPS; //导入依赖的package包/类
/**
* Detects the appropriate media player depending on the URI of
* a file.
* @param uri path to a file.
* @return a media player.
*/
private AbstractMediaPlayer getMediaPlayer(String uri) {
if (uri.startsWith(HTTP.getProtocolName())) {
return mNativeMediaPlayer;
} else if (uri.startsWith(HTTPS.getProtocolName())) {
return mNativeMediaPlayer;
} else if (uri.startsWith(File.getProtocolName())) {
return mNativeMediaPlayer;
} else if (uri.startsWith(RTSP.getProtocolName())) {
return mNativeMediaPlayer;
} else if (uri.startsWith(MMS.getProtocolName())) {
return getFFmpegPlayer();
} else if (uri.startsWith(MMSH.getProtocolName())) {
return getFFmpegPlayer();
} else if (uri.startsWith(MMST.getProtocolName())) {
return getFFmpegPlayer();
} else {
return mNativeMediaPlayer;
}
}
示例2: setDataSource
import net.sourceforge.servestream.transport.HTTPS; //导入依赖的package包/类
@Override
public void setDataSource(Context context, long id) throws IOException,
IllegalArgumentException, SecurityException, IllegalStateException {
mId = id;
String path = getUri(context, id);
Uri uri = TransportFactory.getUri(path);
if (uri == null ||
(!uri.getScheme().equals(HTTP.getProtocolName()) &&
!uri.getScheme().equals(HTTPS.getProtocolName()))) {
throw new IllegalArgumentException();
}
UriBean uriBean = TransportFactory.getTransport(uri.getScheme()).createUri(uri);
if (uriBean == null) {
throw new IllegalArgumentException();
}
mUrl = uriBean.getURL();
}