com.jcraft.jsch.ChannelSftp.getExtension()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(1.6k)|赞(0)|评价(0)|浏览(142)

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

ChannelSftp.getExtension介绍

[英]returns the extension data sent by the server corresponding to some extension name. This method is now used nowhere.
[中]返回服务器发送的与某个扩展名对应的扩展数据。这种方法现在在任何地方都没有使用。

代码示例

代码示例来源:origin: org.eclipse.jgit/org.eclipse.jgit

/**
   * Determine whether the server has the posix-rename extension.
   *
   * @return {@code true} if it is supported, {@code false} otherwise
   * @see <a href=
   *      "https://cvsweb.openbsd.org/src/usr.bin/ssh/PROTOCOL?annotate=HEAD">OpenSSH
   *      deviations and extensions to the published SSH protocol</a>
   * @see <a href=
   *      "http://pubs.opengroup.org/onlinepubs/9699919799/functions/rename.html">stdio.h:
   *      rename()</a>
   */
  private boolean hasPosixRename() {
    return "1".equals(ftp.getExtension("posix-rename@openssh.com")); //$NON-NLS-1$//$NON-NLS-2$
  }
}

代码示例来源:origin: berlam/github-bucket

/**
   * Determine whether the server has the posix-rename extension.
   *
   * @return {@code true} if it is supported, {@code false} otherwise
   * @see <a href=
   *      "https://cvsweb.openbsd.org/src/usr.bin/ssh/PROTOCOL?annotate=HEAD">OpenSSH
   *      deviations and extensions to the published SSH protocol</a>
   * @see <a href=
   *      "http://pubs.opengroup.org/onlinepubs/9699919799/functions/rename.html">stdio.h:
   *      rename()</a>
   */
  private boolean hasPosixRename() {
    return "1".equals(ftp.getExtension("posix-rename@openssh.com")); //$NON-NLS-1$//$NON-NLS-2$
  }
}

相关文章

微信公众号

最新文章

更多

ChannelSftp类方法