/** * Returns a socket of the data connection. * Wrapped as an {@link SSLSocket}, which carries out handshake processing. * @param command The int representation of the FTP command to send. * @param arg The arguments to the FTP command. * If this parameter is set to null, then the command is sent with * no arguments. * @return corresponding to the established data connection. * Null is returned if an FTP protocol error is reported at any point * during the establishment and initialization of the connection. * @throws IOException If there is any problem with the connection. * @see FTPClient#_openDataConnection_(int, String) * @deprecated (3.3) Use {@link FTPClient#_openDataConnection_(FTPCmd, String)} instead */ @Override // Strictly speaking this is not needed, but it works round a Clirr bug // So rather than invoke the parent code, we do it here @Deprecated protected Socket _openDataConnection_(int command, String arg) throws IOException { return _openDataConnection_(FTPCommand.getCommand(command), arg); }
@Override protected Socket _openDataConnection_(final String command, final String arg) throws IOException { final Socket socket = super._openDataConnection_(command, arg); if(null == socket) { throw new FTPException(this.getReplyCode(), this.getReplyString()); } return socket; }