您的位置:首页 > 理论基础 > 计算机网络

判断 http:// 或者 https:// 协议

2013-11-28 23:44 369 查看
本文来自http://blog.csdn.net/u012972188 ,引用必须注明出处!


判断 http:// 或者 https:// 协议

温馨提醒:为了大家能更好学习,强烈推荐大家看看本人的这篇博客
直接上代码
public Boolean isHttp(String orignal) {
int count = orignal.length();
boolean temBoolean = false;
if (count > 8) {
if (orignal.startsWith("http://")) {
temBoolean = true;
// System.out.println("kk--》");
// System.out.println("http://");
} else if (orignal.startsWith("https://")) {
temBoolean = true;
}
}
return temBoolean;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: