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

x33g5p2x  于2022-01-20 转载在 其他  
字(4.1k)|赞(0)|评价(0)|浏览(88)

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

HttpURL.indexFirstOf介绍

暂无

代码示例

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

/**
 * Get the raw-escaped password.
 *
 * @return the raw-escaped password
 */
public char[] getRawPassword() {
  int from = indexFirstOf(_userinfo, ':');
  if (from == -1) {
    return null; // null or only user.
  }
  int len = _userinfo.length - from - 1;
  char[] result = new char[len];
  System.arraycopy(_userinfo, from + 1, result, 0, len);
  return result;
}

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

/**
 * Get the raw-escaped user.
 *
 * @return the raw-escaped user
 */
public char[] getRawUser() {
  if (_userinfo == null || _userinfo.length == 0) {
    return null;
  }
  int to = indexFirstOf(_userinfo, ':');
  // String.indexOf(':', 0, _userinfo.length, _userinfo, 0, 1, 0);
  if (to == -1) {
    return _userinfo; // only user.
  }
  char[] result = new char[to];
  System.arraycopy(_userinfo, 0, result, 0, to);
  return result;
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-httpclient

/**
 * Get the raw-escaped password.
 *
 * @return the raw-escaped password
 */
public char[] getRawPassword() {
  int from = indexFirstOf(_userinfo, ':');
  if (from == -1) {
    return null; // null or only user.
  }
  int len = _userinfo.length - from - 1;
  char[] result = new char[len];
  System.arraycopy(_userinfo, from + 1, result, 0, len);
  return result;
}

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

/**
 * Get the raw-escaped password.
 *
 * @return the raw-escaped password
 */
public char[] getRawPassword() {
  int from = indexFirstOf(_userinfo, ':');
  if (from == -1) {
    return null; // null or only user.
  }
  int len = _userinfo.length - from - 1;
  char[] result = new char[len];
  System.arraycopy(_userinfo, from + 1, result, 0, len);
  return result;
}

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

/**
 * Get the raw-escaped password.
 *
 * @return the raw-escaped password
 */
public char[] getRawPassword() {
  int from = indexFirstOf(_userinfo, ':');
  if (from == -1) {
    return null; // null or only user.
  }
  int len = _userinfo.length - from - 1;
  char[] result = new char[len];
  System.arraycopy(_userinfo, from + 1, result, 0, len);
  return result;
}

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

/**
 * Get the raw-escaped password.
 *
 * @return the raw-escaped password
 */
public char[] getRawPassword() {
  int from = indexFirstOf(_userinfo, ':');
  if (from == -1) {
    return null; // null or only user.
  }
  int len = _userinfo.length - from - 1;
  char[] result = new char[len];
  System.arraycopy(_userinfo, from + 1, result, 0, len);
  return result;
}

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

/**
 * Get the raw-escaped user.
 *
 * @return the raw-escaped user
 */
public char[] getRawUser() {
  if (_userinfo == null || _userinfo.length == 0) {
    return null;
  }
  int to = indexFirstOf(_userinfo, ':');
  // String.indexOf(':', 0, _userinfo.length, _userinfo, 0, 1, 0);
  if (to == -1) {
    return _userinfo; // only user.
  }
  char[] result = new char[to];
  System.arraycopy(_userinfo, 0, result, 0, to);
  return result;
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-httpclient

/**
 * Get the raw-escaped user.
 *
 * @return the raw-escaped user
 */
public char[] getRawUser() {
  if (_userinfo == null || _userinfo.length == 0) {
    return null;
  }
  int to = indexFirstOf(_userinfo, ':');
  // String.indexOf(':', 0, _userinfo.length, _userinfo, 0, 1, 0);
  if (to == -1) {
    return _userinfo; // only user.
  }
  char[] result = new char[to];
  System.arraycopy(_userinfo, 0, result, 0, to);
  return result;
}

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

/**
 * Get the raw-escaped user.
 *
 * @return the raw-escaped user
 */
public char[] getRawUser() {
  if (_userinfo == null || _userinfo.length == 0) {
    return null;
  }
  int to = indexFirstOf(_userinfo, ':');
  // String.indexOf(':', 0, _userinfo.length, _userinfo, 0, 1, 0);
  if (to == -1) {
    return _userinfo; // only user.
  }
  char[] result = new char[to];
  System.arraycopy(_userinfo, 0, result, 0, to);
  return result;
}

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

/**
 * Get the raw-escaped user.
 *
 * @return the raw-escaped user
 */
public char[] getRawUser() {
  if (_userinfo == null || _userinfo.length == 0) {
    return null;
  }
  int to = indexFirstOf(_userinfo, ':');
  // String.indexOf(':', 0, _userinfo.length, _userinfo, 0, 1, 0);
  if (to == -1) {
    return _userinfo; // only user.
  }
  char[] result = new char[to];
  System.arraycopy(_userinfo, 0, result, 0, to);
  return result;
}

相关文章