add UrlDecoder

This commit is contained in:
Looly 2020-04-16 01:18:44 +08:00
parent 01b815afab
commit 972234b9d4
3 changed files with 14 additions and 4 deletions

View File

@ -2572,8 +2572,9 @@ public class CollUtil {
* 4. List
* </pre>
*
* @param <E> 元素类型
* @param <T> 集合类型
* @param <E> 元素类型
* @param <T> 集合类型
* @param collectionClass 集合类型
* @return 空集合
* @since 5.3.1
*/

View File

@ -35,10 +35,11 @@ public class UrlPath {
/**
* 是否path的末尾加 /
*
* @param withEngTag 是否path的末尾加 /
* @return this
*/
public UrlPath setWithEndTag(boolean withEngTag){
public UrlPath setWithEndTag(boolean withEngTag) {
this.withEngTag = withEngTag;
return this;
}
@ -67,6 +68,9 @@ public class UrlPath {
/**
* 添加到path最后面
*
* @param segment Path节点
* @return this
*/
public UrlPath add(CharSequence segment) {
add(segment, false);
@ -75,6 +79,9 @@ public class UrlPath {
/**
* 添加到path最前面
*
* @param segment Path节点
* @return this
*/
public UrlPath addBefore(CharSequence segment) {
add(segment, true);
@ -118,7 +125,7 @@ public class UrlPath {
for (String segment : segments) {
builder.append(CharUtil.SLASH).append(URLUtil.encodeAll(segment, charset));
}
if(withEngTag || StrUtil.isEmpty(builder)){
if (withEngTag || StrUtil.isEmpty(builder)) {
builder.append(CharUtil.SLASH);
}
return builder.toString();
@ -154,6 +161,7 @@ public class UrlPath {
/**
* 修正节点包括去掉前后的/去掉空白符
*
* @param segment 节点
* @return 修正后的节点
*/

View File

@ -19,6 +19,7 @@ public interface Action {
*
* @param request 请求对象
* @param response 响应对象
* @throws IOException IO异常
*/
void doAction(HttpServerRequest request, HttpServerResponse response) throws IOException;
}