本文整理汇总了Java中com.trilead.ssh2.sftp.ErrorCodes.getDescription方法的典型用法代码示例。如果您正苦于以下问题:Java ErrorCodes.getDescription方法的具体用法?Java ErrorCodes.getDescription怎么用?Java ErrorCodes.getDescription使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.trilead.ssh2.sftp.ErrorCodes
的用法示例。
在下文中一共展示了ErrorCodes.getDescription方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: constructMessage
import com.trilead.ssh2.sftp.ErrorCodes; //导入方法依赖的package包/类
private static String constructMessage(String s, int errorCode)
{
String[] detail = ErrorCodes.getDescription(errorCode);
if (detail == null)
return s + " (UNKNOW SFTP ERROR CODE)";
return s + " (" + detail[0] + ": " + detail[1] + ")";
}
示例2: getServerErrorCodeSymbol
import com.trilead.ssh2.sftp.ErrorCodes; //导入方法依赖的package包/类
/**
* Get the symbolic name of the error code as given in the SFTP specs.
*
* @return e.g., "SSH_FX_INVALID_FILENAME".
*/
public String getServerErrorCodeSymbol()
{
String[] detail = ErrorCodes.getDescription(sftpErrorCode);
if (detail == null)
return "UNKNOW SFTP ERROR CODE " + sftpErrorCode;
return detail[0];
}
示例3: getServerErrorCodeVerbose
import com.trilead.ssh2.sftp.ErrorCodes; //导入方法依赖的package包/类
/**
* Get the description of the error code as given in the SFTP specs.
*
* @return e.g., "The filename is not valid."
*/
public String getServerErrorCodeVerbose()
{
String[] detail = ErrorCodes.getDescription(sftpErrorCode);
if (detail == null)
return "The error code " + sftpErrorCode + " is unknown.";
return detail[1];
}
示例4: constructMessage
import com.trilead.ssh2.sftp.ErrorCodes; //导入方法依赖的package包/类
private static String constructMessage(String s, int errorCode) {
String[] detail = ErrorCodes.getDescription(errorCode);
if (detail == null)
return s + " (UNKNOW SFTP ERROR CODE)";
return s + " (" + detail[0] + ": " + detail[1] + ")";
}
示例5: getServerErrorCodeSymbol
import com.trilead.ssh2.sftp.ErrorCodes; //导入方法依赖的package包/类
/**
* Get the symbolic name of the error code as given in the SFTP specs.
*
* @return e.g., "SSH_FX_INVALID_FILENAME".
*/
public String getServerErrorCodeSymbol() {
String[] detail = ErrorCodes.getDescription(sftpErrorCode);
if (detail == null)
return "UNKNOW SFTP ERROR CODE " + sftpErrorCode;
return detail[0];
}
示例6: getServerErrorCodeVerbose
import com.trilead.ssh2.sftp.ErrorCodes; //导入方法依赖的package包/类
/**
* Get the description of the error code as given in the SFTP specs.
*
* @return e.g., "The filename is not valid."
*/
public String getServerErrorCodeVerbose() {
String[] detail = ErrorCodes.getDescription(sftpErrorCode);
if (detail == null)
return "The error code " + sftpErrorCode + " is unknown.";
return detail[1];
}