public Integer getReplyCode ( ) { Object replyCode = getHeader ( FtpMessageHeaders . FTP_REPLY_CODE ) ; if ( replyCode != null ) { if ( replyCode instanceof Integer ) { return ( Integer ) replyCode ; } else { return Integer . valueOf ( replyCode . toString ( ) ) ; } } else if ( commandResult != null ) { return Optional . ofNullable ( commandResult . getReplyCode ( ) ) . map ( Integer :: valueOf ) . orElse ( FTPReply . COMMAND_OK ) ; } return null ; }
Gets the reply code .