commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vijay k v <kvvijay1...@linuxquestions.net>
Subject Re: FTPFile throws NullPointerException!!
Date Mon, 07 Jul 2003 04:21:05 GMT
The remote ftp host was a Win NT.By default it gives a DOS like listing of the files. I guess
the default parser dosen't  work quite  well with DOS like listings. So I issued a SITE command
to get UNIX like listings and bingo!!!...that worked. I am wondering if there are parsers
available that would function in a more generic manner.

Regards,
Vijay.

--- "Daniel F. Savarese" <dfs@savarese.org> wrote:
>
>In message <20030705081837.363CE7259@sitemail.everyone.net>, vijay k v writes:
>>Then i do ..
>>FTPFile ftpFile[] = ftp.listFiles();
>>
>>But when i do..
>>System.out.println(ftpFile.length);
>>
>>I get a java.lang.NullPointerException
>
>http://jakarta.apache.org/commons/net/apidocs/org/apache/commons/net/ftp/FTPClient.html#listFiles()
>
>Returns:
>    The list of file information contained in the current working directory.
>==> null if the list could not be obtained or if there are no files in the
>    directory.
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: commons-user-help@jakarta.apache.org

_____________________________________________________________
Thank you for choosing LinuxQuestions.
http://www.linuxquestions.org

Mime
View raw message