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

String net::sf::jftp::net::FtpConnection::giveFile ( StringTokenizer  to,
int  lev 
) [inline, private]

get a filename

Definition at line 960 of file FtpConnection.java.

Referenced by sortLs().

    {
        String t2 = null;

        for(int i = 0; i < lev; i++)
        {
            if(to.hasMoreTokens())
            {
                String t = to.nextToken();

                //Log.out("> "+t);
                if(t.equals(" ") || t.equals("\t"))
                {
                    // -

                    /*
                       while(to.hasMoreTokens())
                       {
                               t2 = to.nextToken();
                           if(!t.equals(" ") && !t.equals("\t")) break;
                       }
                    */
                    i--;
                }
            }
        }

        String tmp = "<error>";

        /*
        if(t2 != null)
        {
                tmp = t2;
        }
        */
        while(tmp.equals(" ") || tmp.equals("\t") || tmp.equals("<error>"))
        {
            if(to.hasMoreTokens())
            {
                tmp = to.nextToken();
            }
            else
            {
                break;
            }
        }

        while(to.hasMoreTokens())
        {
            tmp = tmp + to.nextToken();
        }

        //Log.out(">>> "+tmp);
        return tmp;
    }


Generated by  Doxygen 1.6.0   Back to index