最早在Android方面接触这两个概念,是学习ContentProvider的时候,当时花了很多时间,始终不能很好的理解他们的区别,顺带着ContentProvider的用法也无法理解,最近通过实现网页链接和Android-APP的无缝跳转问题,对这里的区别有了一定的认识。

下面是来自StackOverFlow上的一段解释What's the difference between a URI and a URL?:

A URI can be further classified as a locator, a name, or both. The term "Uniform Resource Locator" (URL) refers to the subset of URIs that, in addition to identifying a resource, provide a means of locating the resource by describing its primary access mechanism (e.g., its network "location"). The term "Uniform Resource Name" (URN) has been used historically to refer to both URIs under the "urn" scheme [RFC2141], which are required to remain globally unique and persistent even when the resource ceases to exist or becomes unavailable, and to any other URI with the properties of a name.

URI(Uniform Resource Identifier)中文名为统一资源标识符。

URL(Uniform Resource Locator)中文名字为统一资源定位符。

Examples

  • Roger Pate

This is my name, which is identification. It is like a URI, but cannot be a URL, as it tells you nothing about my location or how to contact me. In this case it also happens to identify at least 5 other people in the USA alone.

  • 4914 West Bay Street, Nassau, Bahamas

This is a location, which is identification for that physical location. It is like both a URL and URI (since all URLs are URIs), and also identifies me indirectly as "resident of..". In this case it uniquely identifies me, but that would change if I get a roommate.

I say "like" because these examples do not follow the required syntax.

URIs identify and URLs locate; however, locations are also identifications, so every URL is also a URI, but there are URIs which are not URLs.

在Wikipedia上面,解释如下:

URIs can be classified as locators (URLs), as names (URNs), or as both. A uniform resource name (URN) functions like a person's name, while a uniform resource locator (URL) resembles that person's street address. In other words: the URN defines an item's identity, while the URL provides a method for finding it.

uniform resource locator, abbreviated URL, also known as web address, is a specific character string that constitutes a reference to a resource. In most web browsers, the URL of a web page is displayed on top inside an address bar. An example of a typical URL would be "http://en.example.org/wiki/Main_Page".

三者的关系如下:

OK,上面一大段英文之后,如果看懂了,基本上有了一个大概的了解,URN确定了一个资源的身份,比如,我可以叫你为大脚印,大脚印标志了你的身份,但是我应该如何找到你呢?XX学校XX班级的大脚印!这是一个URL(但是其实根据上面URL的定义,URL定义的应该是网址,我的理解是,URL代表着URI的一种形式,URI中用来标志一个资源位置的方式还有很多,最常见的比如文件系统中的某个文件的绝对地址),通过这个URL我们可以找到这个资源!URL和URN同统一包含于URI。

下面我去整理一下ContentProvider的有关文章。

转载于:https://www.cnblogs.com/lqminn/archive/2013/04/20/3031949.html

【Android】Uri和Url和URN相关推荐

  1. URI,URL和URN有什么区别?

    人们谈论URL , URI和URN好像是不同的东西,但是用肉眼看起来都是一样的. 它们之间有什么明显区别? #1楼 这是我的简化: URN:唯一资源名称,即" what"(例如ur ...

  2. URI和URL及URN的区别

    对于URL,大家都比较熟悉,其他两个词就比较陌生了.URI.URL和URN是识别.定位和命名互联网上的资源的标准途径.1989年Tim Berners-Lee发明了互联网(World Wide Web ...

  3. URI、URL和URN的关系

    在学习Java网络编程时,对URI和URL概念模糊不清,于是进行了资料查询和知识总结.本文讲述了URI.URL和URN基本概念和区别联系,如有问题,切望指正. 一.URI.URL.URN基本概念 1. ...

  4. URI、URL与URN【定义+联系】

    URI.URL与URN的定义与之间的关系 文章目录 URI.URL与URN的定义与之间的关系 1.前言 2.URI.URL与URN的定义 2.1 URI(Uniform Resource Identi ...

  5. 一次搞懂 URI、URL、URN

    一次搞懂 URI.URL.URN 文章目录 一次搞懂 URI.URL.URN 简介 参考 正文 名词解释 URI 格式 URL 格式 URN 格式 结语 简介 在使用网络相关的 API 又或是信息传输 ...

  6. URI、URL和URN的区别和联系

    什么是URI.URL.URN? URI(Uniform Resource Identifier ):统一资源标识符.URI类似于资源的 id,一个URI能够标识唯一一份资源,但反之则未必. URL(U ...

  7. URI、URL 和 URN 之间有什么区别?

    问题描述: 人们谈论 URL.URI 和 URN,就好像它们是不同的东西,但在肉眼看来它们是一样的. 它们之间有什么可区分的区别? 解决方案1: 与HuntsBot一起,探索全球自由职业机会–hunt ...

  8. URI、URL、URN

    一.简述 调用 Web 地址是普通的一个行为.一般这种情况,大家都会说,将"URL"放到浏览器中.这里提到的 URL ,其实不是一个 URL ,是网址的意思.URI 是统一资源标识 ...

  9. 【浅析URI、URL和URN】

    文章目录 一.URI 1.认识URI 2.URI的组成 二.URL 三.URN 四.三者的关系 一.URI 1.认识URI   URI,统一资源标志符(Uniform Resource Identif ...

  10. JAVA基础 - URI、URL和URN的区别

    什么是URI(统一资源标识符)? "A Uniform Resource Identifier (URI) 是一个紧凑的字符串用来标识抽象或物理资源." 用于标识一个抽象或物理资源 ...

最新文章

  1. html中legend设置大小,HTML_如何给 legend 标签设定宽度,我们在做表单的时候经常会使 - phpStudy...
  2. SharpDevelop 开源的 C# IDE ! 和 SharpZipLib
  3. DL之InceptionV2/V3:InceptionV2 InceptionV3算法的简介(论文介绍)、架构详解、案例应用等配图集合之详细攻略
  4. transform你不知道的那些事
  5. openshift_在OpenShift上托管的WildFly实例上进行Arquillian测试
  6. 视频光端机的应用领域有哪些?
  7. mysql备份还原(视图、存储过程)
  8. 卷积神经网络中十大令人拍案叫绝的操作
  9. Caused by: org.apache.catalina.LifecycleException: A child container failed during start
  10. oracle修改字符集_oracle修改数据库字符集
  11. settings.xml的配置
  12. POJ 2817 状态DP 字符串找最多的重复
  13. php 对ioc容器的理解,关于php:了解IoC容器和依赖注入
  14. 关于防止sql注入的几种手段
  15. arduino IED2.0实现Serial.println打印结果
  16. 荣耀 android 11 rom,华为荣耀畅玩4/4X CM11 七版通刷
  17. 最大质因子递归解法python
  18. 技嘉Gigabyte主板Z370HD3安装1080ti+ubuntu17.10+Cuda9.1+cudnn7+tensorflow
  19. 1628 Pizza Delivery
  20. 10-富文本编辑器wangEditor的使用

热门文章

  1. C++之构造函数和析构函数强化
  2. 常用宏定义 - 系统相关
  3. Red Hat Enterprise Linux Server release 7.0双系统安装
  4. 硬链接与符号链接的比较?
  5. LVS+Keepalived负载均衡方式总结
  6. mapreduce shuffle过程问答
  7. .NET MVC异步调用中的Session问题
  8. 使用use index优化sql查询
  9. jQuery:仿MSN网站的tab效果
  10. git checkout 和 git reset