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

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

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

Buffer.getBoolean介绍

暂无

代码示例

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

protected RequestHandler.Result handleXonXoff(Buffer buffer, boolean wantReply) throws IOException {
  boolean clientCanDo = buffer.getBoolean();
  if (log.isDebugEnabled()) {
    log.debug("handleXonXoff({})[want-reply={}] client-can-do={}",
         this, wantReply, clientCanDo);
  }
  return RequestHandler.Result.ReplySuccess;
}

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

protected RequestHandler.Result handleXonXoff(Buffer buffer, boolean wantReply) throws IOException {
  boolean clientCanDo = buffer.getBoolean();
  if (log.isDebugEnabled()) {
    log.debug("handleXonXoff({})[want-reply={}] client-can-do={}", this, wantReply, clientCanDo);
  }
  return RequestHandler.Result.ReplySuccess;
}

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

/**
 * Retrieves the end-of-list indicator for {@code SSH_FXP_NAME} responses, provided
 * the version is at least 6, and the buffer has enough available data
 *
 * @param buffer  The {@link Buffer} to retrieve the data from
 * @param version The SFTP version being used
 * @return The indicator value - {@code null} if none retrieved
 * @see <A HREF="https://tools.ietf.org/html/draft-ietf-secsh-filexfer-13#section-9.4">SFTP v6 - section 9.4</A>
 * @see #indicateEndOfNamesList(Buffer, int, PropertyResolver, boolean)
 */
public static Boolean getEndOfListIndicatorValue(Buffer buffer, int version) {
  return (version <  SftpConstants.SFTP_V6) || (buffer.available() < 1) ? null : buffer.getBoolean();
}

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

/**
 * Retrieves the end-of-file indicator for {@code SSH_FXP_DATA} responses, provided
 * the version is at least 6, and the buffer has enough available data
 *
 * @param buffer  The {@link Buffer} to retrieve the data from
 * @param version The SFTP version being used
 * @return The indicator value - {@code null} if none retrieved
 * @see <A HREF="https://tools.ietf.org/html/draft-ietf-secsh-filexfer-13#section-9.3">SFTP v6 - section 9.3</A>
 */
public static Boolean getEndOfFileIndicatorValue(Buffer buffer, int version) {
  return (version <  SftpConstants.SFTP_V6) || (buffer.available() < 1) ? null : buffer.getBoolean();
}

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

@Override
public void handleRequest(Buffer buffer) throws IOException {
  handleChannelRequest(buffer.getString(), buffer.getBoolean(), buffer);
}

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

@Override
public void handleRequest(Buffer buffer) throws IOException {
  handleChannelRequest(buffer.getString(), buffer.getBoolean(), buffer);
}

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

@Override
public void handleDebugMessage(Session session, Buffer buffer) throws Exception {
  handleDebugMessage(session, buffer.getBoolean(), buffer.getString(), buffer.getString(), buffer);
}

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

@Override
public void handleDebugMessage(Session session, Buffer buffer) throws Exception {
  handleDebugMessage(session, buffer.getBoolean(), buffer.getString(), buffer.getString(), buffer);
}

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

@Override
protected String processRequestValue(Channel channel, String request, Buffer buffer) throws Exception {
  return processRequestValue(channel, buffer.getString(), buffer.getBoolean(), buffer.getString(), buffer.getString());
}

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

wantReply = buffer.getBoolean();

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

@Override
protected String processRequestValue(Channel channel, String request, Buffer buffer) throws Exception {
  return processRequestValue(channel, buffer.getString(), buffer.getBoolean(), buffer.getString(), buffer.getString());
}

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

protected void doLink(Buffer buffer, int id) throws IOException {
  String targetPath = buffer.getString();
  String linkPath = buffer.getString();
  boolean symLink = buffer.getBoolean();
  try {
    if (log.isDebugEnabled()) {
      log.debug("doLink({})[id={}] SSH_FXP_LINK linkpath={}, targetpath={}, symlink={}",
           getServerSession(), id, linkPath, targetPath, symLink);
    }
    doLink(id, targetPath, linkPath, symLink);
  } catch (IOException | RuntimeException e) {
    sendStatus(prepareReply(buffer), id, e, SftpConstants.SSH_FXP_LINK, targetPath, linkPath, symLink);
    return;
  }
  sendStatus(prepareReply(buffer), id, SftpConstants.SSH_FX_OK, "");
}

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

protected RequestHandler.Result handleX11Forwarding(String requestType, Buffer buffer, boolean wantReply) throws IOException {
  ServerSession session = getServerSession();
  boolean singleConnection = buffer.getBoolean();
  String authProtocol = buffer.getString();
  String authCookie = buffer.getString();

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

protected void doCopyFile(Buffer buffer, int id) throws IOException {
  String srcFile = buffer.getString();
  String dstFile = buffer.getString();
  boolean overwriteDestination = buffer.getBoolean();
  try {
    doCopyFile(id, srcFile, dstFile, overwriteDestination);
  } catch (IOException | RuntimeException e) {
    sendStatus(prepareReply(buffer), id, e,
      SftpConstants.SSH_FXP_EXTENDED, SftpConstants.EXT_COPY_FILE, srcFile, dstFile, overwriteDestination);
    return;
  }
  sendStatus(prepareReply(buffer), id, SftpConstants.SSH_FX_OK, "");
}

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

@Override
public Boolean doAuth(Buffer buffer, boolean init) throws Exception {
  ValidateUtils.checkTrue(init, "Instance not initialized");
  boolean newPassword = buffer.getBoolean();
  String password = buffer.getString();
  if (newPassword) {
    return handleClientPasswordChangeRequest(buffer, getServerSession(), getUsername(), password, buffer.getString());
  } else {
    return checkPassword(buffer, getServerSession(), getUsername(), password);
  }
}

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

@Override
public Boolean doAuth(Buffer buffer, boolean init) throws Exception {
  ValidateUtils.checkTrue(init, "Instance not initialized");
  boolean newPassword = buffer.getBoolean();
  String password = buffer.getString();
  if (newPassword) {
    return handleClientPasswordChangeRequest(buffer, getServerSession(), getUsername(), password, buffer.getString());
  } else {
    return checkPassword(buffer, getServerSession(), getUsername(), password);
  }
}

代码示例来源:origin: io.termd/termd-core

boolean partial = buffer.getBoolean();
if (log.isDebugEnabled()) {
  log.debug("Received SSH_MSG_USERAUTH_FAILURE - partial={}, methods={}", partial, methods);

代码示例来源:origin: termd/termd

boolean partial = buffer.getBoolean();
if (log.isDebugEnabled()) {
  log.debug("Received SSH_MSG_USERAUTH_FAILURE - partial={}, methods={}", partial, methods);

代码示例来源:origin: com.alibaba.middleware/termd-core

boolean partial = buffer.getBoolean();
if (log.isDebugEnabled()) {
  log.debug("Received SSH_MSG_USERAUTH_FAILURE - partial={}, methods={}", partial, methods);

代码示例来源:origin: io.termd/termd-core

boolean partial = buffer.getBoolean();
if (log.isDebugEnabled()) {
  log.debug("Received SSH_MSG_USERAUTH_FAILURE - partial={}, methods={}", partial, methods);

相关文章