本文整理了Java中org.jooby.Router.decode
方法的一些代码示例,展示了Router.decode
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Router.decode
方法的具体详情如下:
包路径:org.jooby.Router
类名称:Router
方法名:decode
[英]Decode a path by delegating to URLDecoder#decode(String,String).
[中]通过委托给URLDecover#Decode(String,String)来解码路径。
代码示例来源:origin: jooby-project/jooby
public ServletServletRequest(final HttpServletRequest req, final String tmpdir,
final boolean multipart) throws IOException {
this.req = requireNonNull(req, "HTTP req is required.");
this.tmpdir = requireNonNull(tmpdir, "A tmpdir is required.");
this.multipart = multipart;
String pathInfo = req.getPathInfo();
if (pathInfo == null) {
pathInfo = "/";
}
this.path = req.getContextPath() + Router.decode(pathInfo);
}
代码示例来源:origin: jooby-project/jooby
public UndertowRequest(final HttpServerExchange exchange, final Config conf) throws IOException {
this.exchange = exchange;
this.blocking = Suppliers.memoize(() -> this.exchange.startBlocking());
this.conf = conf;
this.path = Router.decode(exchange.getRequestPath());
}
代码示例来源:origin: jooby-project/jooby
public NettyRequest(final ChannelHandlerContext ctx, final HttpRequest req,
final HttpHeaders responseHeaders, final String tmpdir, final int wsMaxMessageSize) {
this.ctx = ctx;
this.req = req;
this.responseHeaders = responseHeaders;
this.tmpdir = tmpdir;
this.query = new QueryStringDecoder(req.uri());
this.path = Router.decode(query.path());
this.wsMaxMessageSize = wsMaxMessageSize;
Channel channel = ctx.channel();
channel.attr(ASYNC).set(false);
}
代码示例来源:origin: org.jooby/jooby-servlet
public ServletServletRequest(final HttpServletRequest req, final String tmpdir,
final boolean multipart) throws IOException {
this.req = requireNonNull(req, "HTTP req is required.");
this.tmpdir = requireNonNull(tmpdir, "A tmpdir is required.");
this.multipart = multipart;
String pathInfo = req.getPathInfo();
if (pathInfo == null) {
pathInfo = "/";
}
this.path = req.getContextPath() + Router.decode(pathInfo);
}
代码示例来源:origin: org.jooby/jooby-undertow
public UndertowRequest(final HttpServerExchange exchange, final Config conf) throws IOException {
this.exchange = exchange;
this.blocking = Suppliers.memoize(() -> this.exchange.startBlocking());
this.conf = conf;
this.path = Router.decode(exchange.getRequestPath());
}
代码示例来源:origin: org.jooby/jooby-netty
public NettyRequest(final ChannelHandlerContext ctx, final HttpRequest req,
final HttpHeaders responseHeaders, final String tmpdir, final int wsMaxMessageSize) {
this.ctx = ctx;
this.req = req;
this.responseHeaders = responseHeaders;
this.tmpdir = tmpdir;
this.query = new QueryStringDecoder(req.uri());
this.path = Router.decode(query.path());
this.wsMaxMessageSize = wsMaxMessageSize;
Channel channel = ctx.channel();
channel.attr(ASYNC).set(false);
}
内容来源于网络,如有侵权,请联系作者删除!