상세 컨텐츠

본문 제목

URI 객체 (java.net.URI)

카테고리 없음

by TISTORY 2016. 8. 23. 14:49

본문

For any URI u, it is always the case that

new URI(u.toString()).equals(u) .

For any URI u that does not contain redundant syntax such as two slashes before an empty authority (as in file:///tmp/ ) or a colon following a host name but no port (as in http://java.sun.com: ), and that does not encode characters except those that must be quoted, the following identities also hold:

new URI(u.getScheme(),
        
u.getSchemeSpecificPart(),
        
u.getFragment())
.equals(
u)

in all cases,

new URI(u.getScheme(),
        
u.getUserInfo(), u.getAuthority(),
        
u.getPath(), u.getQuery(),
        
u.getFragment())
.equals(
u)

if u is hierarchical, and

new URI(u.getScheme(),
        
u.getUserInfo(), u.getHost(), u.getPort(),
        
u.getPath(), u.getQuery(),
        
u.getFragment())
.equals(
u)

if u is hierarchical and has either no authority or a server-based authority.