if(connectionType == FTPConnection.AUTH_TLS_FTP_CONNECTION || connectionType == FTPConnection.AUTH_SSL_FTP_CONNECTION)
if(connectionType != FTPConnection.FTP_CONNECTION)
    public SocketProvider sendPortCommand(Command command) throws IOException,FtpWorkflowException,FtpIOException    {    	ServerSocket server = ServerSocketFactory.getDefault().createServerSocket();    	InetSocketAddress isa = new InetSocketAddress(socketProvider.socket().getLocalAddress(), 0);    	server.bind(isa);    	int port = server.getLocalPort();    	StringBuffer modifiedHost = new StringBuffer();    	modifiedHost.append(server.getInetAddress().getHostAddress().replace('.',','));    	modifiedHost.append(",");    	modifiedHost.append(port >> 8);    	modifiedHost.append(",");    	modifiedHost.append(port & 0x00ff);            	Command portCommand = new Command(Command.PORT,modifiedHost.toString());        Reply portReply = sendCommand(portCommand);        portReply.dumpReply();        portReply.validate();        Reply commandReply = sendCommand(command);        commandReply.dumpReply();        commandReply.validate();        SocketProvider provider = new SocketProvider(server.accept(),false);        provider.socket().setReceiveBufferSize(65536);        provider.socket().setSendBufferSize(65536);        provider.setSSLMode(getConnectionType());        if(connectionType == FTPConnection.AUTH_TLS_FTP_CONNECTION || connectionType == FTPConnection.AUTH_SSL_FTP_CONNECTION)            provider.negotiate();                return provider;    }