Logo Search packages:      
Sourcecode: jftp version File versions  Download package

net::sf::jftp::net::FtpConnection::FtpConnection ( String  host,
int  port,
String  initCWD,
String  crlfx 
) [inline]

Connect to the server an log in.

Does also fire directory update and connection initialized event if successful or connection failed event if failed.

Parameters:
username The username
password The password
initCWD The initial remote working directory
crlfx 
, ,
, CR, LF or CRLF - line break style of the server
Returns:
WRONG_LOGIN_DATA, OFFLINE, GENERIC_FAILED or LOGIN_OK status code

Definition at line 203 of file FtpConnection.java.

References setLocalPath().

    {
        this.host = host;
        this.port = port;
        this.initCWD = initCWD;
      
        if(crlfx != null) {
            if(crlfx.equals("\n") || crlfx.equals("\r") || crlfx.equals("\r\n")) this.crlf = crlfx;
            crlfx = crlfx.trim().toUpperCase();
            if(crlfx.equals("LF")) this.crlf = "\n";
            else if(crlfx.equals("CR")) this.crlf = "\r";
            else if(crlfx.equals("CRLF")) this.crlf = "\r\n";
        }
        //Log.out("\n\nCRLF:---"+crlf+"---\n\n");

        File f = new File(".");
        setLocalPath(f.getAbsolutePath());
    }


Generated by  Doxygen 1.6.0   Back to index