/** * Get the reply, and pass it to command listeners */ private void __getReply() throws IOException { __getReply(true); }
/** * Get the reply, but don't pass it to command listeners. * Used for keep-alive processing only. * @since 3.0 * @throws IOException on error */ protected void __getReplyNoReport() throws IOException { __getReply(false); }
/*** * Fetches a reply from the FTP server and returns the integer reply * code. After calling this method, the actual reply text can be accessed * from either calling {@link #getReplyString getReplyString } or * {@link #getReplyStrings getReplyStrings }. Only use this * method if you are implementing your own FTP client or if you need to * fetch a secondary response from the FTP server. * * @return The integer value of the reply code of the fetched FTP reply. * @throws FTPConnectionClosedException * If the FTP server prematurely closes the connection as a result * of the client being idle or some other reason causing the server * to send FTP reply code 421. This exception may be caught either * as an IOException or independently as itself. * @throws IOException If an I/O error occurs while receiving the * server reply. ***/ public int getReply() throws IOException { __getReply(); return _replyCode; }
_socket_.setSoTimeout(connectTimeout); try { __getReply(); __getReply(); __getReply(); __getReply();
__getReply(); return _replyCode;
/*** * Fetches a reply from the FTP server and returns the integer reply * code. After calling this method, the actual reply text can be accessed * from either calling {@link #getReplyString getReplyString } or * {@link #getReplyStrings getReplyStrings }. Only use this * method if you are implementing your own FTP client or if you need to * fetch a secondary response from the FTP server. * <p> * @return The integer value of the reply code of the fetched FTP reply. * @exception FTPConnectionClosedException * If the FTP server prematurely closes the connection as a result * of the client being idle or some other reason causing the server * to send FTP reply code 421. This exception may be caught either * as an IOException or independently as itself. * @exception IOException If an I/O error occurs while receiving the * server reply. ***/ public int getReply() throws IOException { __getReply(); return _replyCode; }
/*** * Fetches a reply from the FTP server and returns the integer reply * code. After calling this method, the actual reply text can be accessed * from either calling {@link #getReplyString getReplyString } or * {@link #getReplyStrings getReplyStrings }. Only use this * method if you are implementing your own FTP client or if you need to * fetch a secondary response from the FTP server. * <p> * @return The integer value of the reply code of the fetched FTP reply. * @exception FTPConnectionClosedException * If the FTP server prematurely closes the connection as a result * of the client being idle or some other reason causing the server * to send FTP reply code 421. This exception may be caught either * as an IOException or independently as itself. * @exception IOException If an I/O error occurs while receiving the * server reply. ***/ public int getReply() throws IOException { __getReply(); return _replyCode; }
/** * Initiates control connections and gets initial reply. * Initializes {@link #_controlInput_} and {@link #_controlOutput_}. */ @Override protected void _connectAction_() throws IOException { super._connectAction_(); _controlInput_ = new BufferedReader(new InputStreamReader(_socket_.getInputStream(), getControlEncoding())); _controlOutput_ = new BufferedWriter(new OutputStreamWriter(_socket_.getOutputStream(), getControlEncoding())); __getReply(); // If we received code 120, we have to fetch completion reply. if (FTPReply.isPositivePreliminary(_replyCode)) __getReply(); }
protected void _connectAction_() throws IOException { super._connectAction_(); _controlInput = new BufferedReader(new InputStreamReader(getInputStream(), getControlEncoding())); _controlOutput = new BufferedWriter(new OutputStreamWriter(getOutputStream(), getControlEncoding())); __getReply(); // If we received code 120, we have to fetch completion reply. if (FTPReply.isPositivePreliminary(_replyCode)) __getReply(); }
_commandSupport_.fireCommandSent(command, message); __getReply(); return _replyCode;
_commandSupport_.fireCommandSent(command, message); __getReply(); return _replyCode;