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

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

get a filesize

Definition at line 1017 of file FtpConnection.java.

Referenced by sortSize().

    {
        for(int i = 0; i < lev; i++)
        {
            if(to.hasMoreTokens())
            {
                if(to.nextToken().equals(" "))
                {
                    i--;
                }
            }
        }

        while(to.hasMoreTokens())
        {
            String tmp = to.nextToken();

            if(!tmp.equals(" "))
            {
                try
                {
                    Integer.parseInt(tmp);
                }
                catch(NumberFormatException ex)
                {
                    return "-1";
                }

                return tmp;
            }
        }

        return "-2";
    }


Generated by  Doxygen 1.6.0   Back to index