org.apache.commons.httpclient.URI.getProtocolCharset()方法的使用及代码示例

x33g5p2x  于2022-01-31 转载在 其他  
字(6.7k)|赞(0)|评价(0)|浏览(144)

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

URI.getProtocolCharset介绍

[英]Get the protocol charset used by this current URI instance. It was set by the constructor for this instance. If it was not set by contructor, it will return the default protocol charset.
[中]获取当前URI实例使用的协议字符集。它是由构造函数为此实例设置的。如果constructor没有设置它,它将返回默认的协议字符集。

代码示例

代码示例来源:origin: commons-httpclient/commons-httpclient

/**
 * Get the query.
 *
 * @return the query string.
 * @throws URIException incomplete trailing escape pattern or unsupported
 * character encoding
 * @see #decode
 */
public String getQuery() throws URIException {
  return (_query == null) ? null : decode(_query, getProtocolCharset());
}

代码示例来源:origin: commons-httpclient/commons-httpclient

/**
 * Get the userinfo.
 *
 * @return the userinfo
 * @throws URIException If {@link #decode} fails
 * @see #getAuthority
 */
public String getUserinfo() throws URIException {
  return (_userinfo == null) ? null : decode(_userinfo,
      getProtocolCharset());
}

代码示例来源:origin: commons-httpclient/commons-httpclient

/**
 * Get the fragment.
 *
 * @return the fragment string
 * @throws URIException incomplete trailing escape pattern or unsupported
 * character encoding
 * @see #decode
 */
public String getFragment() throws URIException {
  return (_fragment == null) ? null : decode(_fragment,
      getProtocolCharset());
}

代码示例来源:origin: commons-httpclient/commons-httpclient

/**
 * It can be gotten the URI character sequence.
 *
 * @return the original URI string
 * @throws URIException incomplete trailing escape pattern or unsupported
 * character encoding
 * @see #decode
 */
public String getURI() throws URIException {
  return (_uri == null) ? null : decode(_uri, getProtocolCharset());
}

代码示例来源:origin: commons-httpclient/commons-httpclient

/**
 * Get the authority.
 *
 * @return the authority
 * @throws URIException If {@link #decode} fails
 */
public String getAuthority() throws URIException {
  return (_authority == null) ? null : decode(_authority,
      getProtocolCharset());
}

代码示例来源:origin: commons-httpclient/commons-httpclient

/**
 * Set the fragment.
 *
 * @param fragment the fragment string.
 * @throws URIException If an error occurs.
 */
public void setFragment(String fragment) throws URIException {
  if (fragment == null || fragment.length() == 0) {
    _fragment = (fragment == null) ? null : fragment.toCharArray();
    hash = 0;
    return;
  }
  _fragment = encode(fragment, allowed_fragment, getProtocolCharset());
  hash = 0;
}

代码示例来源:origin: commons-httpclient/commons-httpclient

/**
 * Get the host.
 * <p><blockquote><pre>
 *   host          = hostname | IPv4address | IPv6reference
 * </pre></blockquote><p>
 *
 * @return the host
 * @throws URIException If {@link #decode} fails
 * @see #getAuthority
 */
public String getHost() throws URIException {
  if (_host != null) {
    return decode(_host, getProtocolCharset());
  } else {
    return null;
  }
}

代码示例来源:origin: commons-httpclient/commons-httpclient

/**
 * Get the level above the this hierarchy level.
 *
 * @return the above hierarchy level
 * @throws URIException If {@link #getRawCurrentHierPath(char[])} fails.
 * @see #decode
 */
public String getAboveHierPath() throws URIException {
  char[] path = getRawAboveHierPath();
  return (path == null) ? null : decode(path, getProtocolCharset());
}

代码示例来源:origin: commons-httpclient/commons-httpclient

/**
 * Get the current hierarchy level.
 *
 * @return the current hierarchy level
 * @throws URIException If {@link #getRawCurrentHierPath(char[])} fails.
 * @see #decode
 */
public String getCurrentHierPath() throws URIException {
  char[] path = getRawCurrentHierPath();
  return (path == null) ? null : decode(path, getProtocolCharset());
}

代码示例来源:origin: commons-httpclient/commons-httpclient

/**
 * Get the original URI reference string.
 *
 * @return the original URI reference string
 * @throws URIException If {@link #decode} fails.
 */
public String getURIReference() throws URIException {
  char[] uriReference = getRawURIReference();
  return (uriReference == null) ? null : decode(uriReference,
      getProtocolCharset());
}

代码示例来源:origin: commons-httpclient/commons-httpclient

/**
 * Get the path.
 * <p><blockquote><pre>
 *   path          = [ abs_path | opaque_part ]
 * </pre></blockquote><p>
 * @return the path string
 * @throws URIException If {@link #decode} fails.
 * @see #decode
 */
public String getPath() throws URIException { 
  char[] path =  getRawPath();
  return (path == null) ? null : decode(path, getProtocolCharset());
}

代码示例来源:origin: commons-httpclient/commons-httpclient

/**
 * Get the path and query.
 *
 * @return the path and query string.
 * @throws URIException incomplete trailing escape pattern or unsupported
 * character encoding
 * @see #decode
 */
public String getPathQuery() throws URIException {
  char[] rawPathQuery = getRawPathQuery();
  return (rawPathQuery == null) ? null : decode(rawPathQuery,
      getProtocolCharset());
}

代码示例来源:origin: commons-httpclient/commons-httpclient

/**
 * Set the query.
 * <p>
 * When a query string is not misunderstood the reserved special characters
 * ("&amp;", "=", "+", ",", and "$") within a query component, it is
 * recommended to use in encoding the whole query with this method.
 * <p>
 * The additional APIs for the special purpose using by the reserved
 * special characters used in each protocol are implemented in each protocol
 * classes inherited from <code>URI</code>.  So refer to the same-named APIs
 * implemented in each specific protocol instance.
 *
 * @param query the query string.
 * @throws URIException incomplete trailing escape pattern or unsupported
 * character encoding
 * @see #encode
 */
public void setQuery(String query) throws URIException {
  if (query == null || query.length() == 0) {
    _query = (query == null) ? null : query.toCharArray();
    setURI();
    return;
  }
  setRawQuery(encode(query, allowed_query, getProtocolCharset()));
}

代码示例来源:origin: commons-httpclient/commons-httpclient

/**
 * Get the basename of the path.
 *
 * @return the basename string
 * @throws URIException incomplete trailing escape pattern or unsupported
 * character encoding
 * @see #decode
 */
public String getName() throws URIException {
  char[] basename = getRawName();
  return (basename == null) ? null : decode(getRawName(),
      getProtocolCharset());
}

代码示例来源:origin: commons-httpclient/commons-httpclient

String charset = getProtocolCharset();

代码示例来源:origin: commons-httpclient/commons-httpclient

String charset = getProtocolCharset();

代码示例来源:origin: commons-httpclient/commons-httpclient

getProtocolCharset());

代码示例来源:origin: commons-httpclient/commons-httpclient

String charset = getProtocolCharset();

代码示例来源:origin: org.apache.commons/com.springsource.org.apache.commons.httpclient

/**
 * Get the query.
 *
 * @return the query string.
 * @throws URIException incomplete trailing escape pattern or unsupported
 * character encoding
 * @see #decode
 */
public String getQuery() throws URIException {
  return (_query == null) ? null : decode(_query, getProtocolCharset());
}

代码示例来源:origin: org.apache.commons/com.springsource.org.apache.commons.httpclient

/**
 * Get the current hierarchy level.
 *
 * @return the current hierarchy level
 * @throws URIException If {@link #getRawCurrentHierPath(char[])} fails.
 * @see #decode
 */
public String getCurrentHierPath() throws URIException {
  char[] path = getRawCurrentHierPath();
  return (path == null) ? null : decode(path, getProtocolCharset());
}

相关文章