org.apache.sshd.common.util.buffer.Buffer.getStringList()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(3.9k)|赞(0)|评价(0)|浏览(102)

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

Buffer.getStringList介绍

暂无

代码示例

代码示例来源:origin: org.apache.sshd/sshd-osgi

/**
 * @param usePrependedLength If {@code true} then there is a 32-bit
 * value indicating the number of strings to read. Otherwise, the
 * method will use a "greedy" reading of strings while more
 * data available.
 * @return A {@link Collection} of the read strings
 * @see #getStringList(boolean, Charset)
 */
public Collection<String> getStringList(boolean usePrependedLength) {
  return getStringList(usePrependedLength, StandardCharsets.UTF_8);
}

代码示例来源:origin: org.apache.sshd/sshd-common

/**
 * @param usePrependedLength If {@code true} then there is a 32-bit
 *                           value indicating the number of strings to read. Otherwise, the
 *                           method will use a &quot;greedy&quot; reading of strings while more
 *                           data available
 * @return A {@link Collection} of the read strings
 * @see #getStringList(boolean, Charset)
 */
public Collection<String> getStringList(boolean usePrependedLength) {
  return getStringList(usePrependedLength, StandardCharsets.UTF_8);
}

代码示例来源:origin: org.apache.sshd/sshd-common

/**
 * @param count The <U>exact</U> number of strings to read - can be zero
 * @return A {@link List} with the specified number of strings
 * @see #getStringList(int, Charset)
 */
public List<String> getStringList(int count) {
  return getStringList(count, StandardCharsets.UTF_8);
}

代码示例来源:origin: org.apache.sshd/sshd-osgi

/**
 * @param count The <U>exact</U> number of strings to read - can be zero
 * @return A {@link List} with the specified number of strings
 * @see #getStringList(int, Charset)
 */
public List<String> getStringList(int count) {
  return getStringList(count, StandardCharsets.UTF_8);
}

代码示例来源:origin: org.apache.sshd/sshd-osgi

/**
 * @param usePrependedLength If {@code true} then there is a 32-bit
 * value indicating the number of strings to read. Otherwise, the
 * method will use a &quot;greedy&quot; reading of strings while more
 * data available.
 * @param charset The {@link Charset} to use for the strings
 * @return A {@link Collection} of the read strings
 * @see #getStringList(int, Charset)
 * @see #getAvailableStrings()
 */
public Collection<String> getStringList(boolean usePrependedLength, Charset charset) {
  if (usePrependedLength) {
    int count = getInt();
    return getStringList(count, charset);
  } else {
    return getAvailableStrings(charset);
  }
}

代码示例来源:origin: org.apache.sshd/sshd-common

/**
 * @param usePrependedLength If {@code true} then there is a 32-bit
 *                           value indicating the number of strings to read. Otherwise, the
 *                           method will use a &quot;greedy&quot; reading of strings while more
 *                           data available
 * @param charset            The {@link Charset} to use for the string
 * @return A {@link Collection} of the read strings
 * @see #getStringList(int, Charset)
 * @see #getAvailableStrings()
 */
public Collection<String> getStringList(boolean usePrependedLength, Charset charset) {
  if (usePrependedLength) {
    int count = getInt();
    return getStringList(count, charset);
  } else {
    return getAvailableStrings(charset);
  }
}

代码示例来源:origin: org.apache.sshd/sshd-sftp

public Supported2 parse(Buffer buffer) {
    Supported2 sup2 = new Supported2();
    sup2.supportedAttributeMask = buffer.getInt();
    sup2.supportedAttributeBits = buffer.getInt();
    sup2.supportedOpenFlags = buffer.getInt();
    sup2.supportedAccessMask = buffer.getInt();
    sup2.maxReadSize = buffer.getInt();
    sup2.supportedOpenBlockVector = buffer.getShort();
    sup2.supportedBlock = buffer.getShort();
    sup2.attribExtensionNames = buffer.getStringList(true);
    sup2.extensionNames = buffer.getStringList(true);
    return sup2;
  }
}

代码示例来源:origin: org.apache.sshd/sshd-sftp

public Supported parse(Buffer buffer) {
    Supported sup = new Supported();
    sup.supportedAttributeMask = buffer.getInt();
    sup.supportedAttributeBits = buffer.getInt();
    sup.supportedOpenFlags = buffer.getInt();
    sup.supportedAccessMask = buffer.getInt();
    sup.maxReadSize = buffer.getInt();
    sup.extensionNames = buffer.getStringList(false);
    return sup;
  }
}

相关文章