org.apache.wicket.request.Request.getCharset()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(3.8k)|赞(0)|评价(0)|浏览(123)

本文整理了Java中org.apache.wicket.request.Request.getCharset方法的一些代码示例,展示了Request.getCharset的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.getCharset方法的具体详情如下:
包路径:org.apache.wicket.request.Request
类名称:Request
方法名:getCharset

Request.getCharset介绍

[英]Gets charset of the request
[中]获取请求的字符集

代码示例

代码示例来源:origin: apache/wicket

@Override
public Charset getCharset()
{
  return Request.this.getCharset();
}

代码示例来源:origin: org.apache.wicket/wicket-request

@Override
public Charset getCharset()
{
  return Request.this.getCharset();
}

代码示例来源:origin: org.apache.wicket/wicket-core

private static Charset getCurrentCharset()
{
  return RequestCycle.get().getRequest().getCharset();
}

代码示例来源:origin: apache/wicket

private static Charset getCurrentCharset()
{
  return RequestCycle.get().getRequest().getCharset();
}

代码示例来源:origin: apache/wicket

/**
 * @param requestCycle
 * @return the configured encoding or the request's one as default
 */
private String getEncoding(final IRequestCycle requestCycle)
{
  String encoding = this.encoding;
  if (Strings.isEmpty(encoding))
  {
    Charset charset = requestCycle.getRequest().getCharset();
    if (charset != null)
    {
      encoding = charset.name();
    }
  }
  return encoding;
}

代码示例来源:origin: org.apache.wicket/wicket-request

/**
 * @param requestCycle
 * @return the configured encoding or the request's one as default
 */
private String getEncoding(final IRequestCycle requestCycle)
{
  String encoding = this.encoding;
  if (Strings.isEmpty(encoding))
  {
    Charset charset = requestCycle.getRequest().getCharset();
    if (charset != null)
    {
      encoding = charset.name();
    }
  }
  return encoding;
}

代码示例来源:origin: org.apache.wicket/wicket-core

/**
 * Take URL-encoded query string value, decode it and return HTML-escaped version
 * 
 * @param s
 *            value to decode
 * @return URL decoded and HTML escaped value
 */
private String recode(String s)
{
  String un = UrlDecoder.QUERY_INSTANCE.decode(s, getRequest().getCharset());
  return Strings.escapeMarkup(un).toString();
}

代码示例来源:origin: apache/wicket

/**
 * Take URL-encoded query string value, decode it and return HTML-escaped version
 * 
 * @param s
 *            value to decode
 * @return URL decoded and HTML escaped value
 */
private String recode(String s)
{
  String un = UrlDecoder.QUERY_INSTANCE.decode(s, getRequest().getCharset());
  return Strings.escapeMarkup(un).toString();
}

代码示例来源:origin: brix-cms/brix-cms

private CharSequence createCallbackUrl(String subpath) {
  Url url = Url.parse(urlForListener(requestListener, null).toString());
  url.addQueryParameter("path", subpath);
  return url.toString(getRequest().getCharset());
}

代码示例来源:origin: org.apache.wicket/wicket-core

Url url = new Url(request.getCharset());
Url originalUrl = Url.parse(decryptedUrl, request.getCharset());

代码示例来源:origin: apache/wicket

Url url = new Url(request.getCharset());
Url originalUrl = Url.parse(decryptedUrl, request.getCharset());

代码示例来源:origin: brix-cms/brix-cms

@Override
  public void onRequest() {
    String path = getRequest().getRequestParameters().getParameterValue("path").toString();
    // if (path == null) {
    // path = getRequestCycle().getPageParameters().getString("path");
    // }
    path = UrlDecoder.QUERY_INSTANCE.decode(path, getRequest().getCharset());
    onPathClicked(new Path(path));
  }
});

代码示例来源:origin: org.wicketstuff/wicketstuff-select2

OutputStreamWriter out = new OutputStreamWriter(outputStream, request.getCharset());
JSONStringer json = new JSONStringer();

代码示例来源:origin: com.vaynberg.wicket.select2/wicket-select2

webResponse.setContentType("application/json");
OutputStreamWriter out = new OutputStreamWriter(webResponse.getOutputStream(), getRequest().getCharset());
JSONWriter json = new JSONWriter(out);

代码示例来源:origin: ivaynberg/wicket-select2

webResponse.setContentType("application/json");
OutputStreamWriter out = new OutputStreamWriter(webResponse.getOutputStream(), getRequest().getCharset());
JSONWriter json = new JSONWriter(out);

代码示例来源:origin: theonedev/onedev

webResponse.setContentType("application/json");
OutputStreamWriter out = new OutputStreamWriter(webResponse.getOutputStream(), getRequest().getCharset());
JSONWriter json = new JSONWriter(out);

相关文章