public void close ( boolean ignoreQuitReply ) throws IOException , ServerException { try { if ( ignoreQuitReply ) { controlChannel . write ( Command . QUIT ) ; } else { controlChannel . execute ( Command . QUIT ) ; } } catch ( FTPReplyParseException rpe ) { throw ServerException . embedFTPReplyParseException ( rpe ) ; } catch ( UnexpectedReplyCodeException urce ) { throw ServerException . embedUnexpectedReplyCodeException ( urce , "Server refused closing" ) ; } finally { try { controlChannel . close ( ) ; } finally { localServer . close ( ) ; } } }
Closes connection . Sends QUIT and closes connection even if the server reply was not positive . Also closes the local server .