Package org.miaixz.bus.core.net.url
Class UrlPath
java.lang.Object
org.miaixz.bus.core.net.url.UrlPath
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd(CharSequence segment) 添加到path最后面addBefore(CharSequence segment) 添加到path最前面构建path,前面带'/'getSegment(int index) 获得指定节点获取path的节点列表,如果列表为空,返回ListKit.empty()static UrlPathof()构建UrlPathstatic UrlPathof(CharSequence pathStr, Charset charset) 构建UrlPathparse(CharSequence path, Charset charset) 解析pathsetWithEndTag(boolean withEngTag) 是否path的末尾加 /toString()
-
Constructor Details
-
UrlPath
public UrlPath()
-
-
Method Details
-
of
-
of
构建UrlPath- Parameters:
pathStr- 初始化的路径字符串charset- decode用的编码,null表示不做decode- Returns:
- UrlPath
-
setWithEndTag
是否path的末尾加 /- Parameters:
withEngTag- 是否path的末尾加 /- Returns:
- this
-
getSegments
-
getSegment
-
add
-
addBefore
添加到path最前面- Parameters:
segment- Path节点- Returns:
- this
-
parse
解析path- Parameters:
path- 路径,类似于aaa/bb/ccc或/aaa/bbb/ccccharset- decode编码,null表示不解码- Returns:
- this
-
build
-
toString
-