commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mailing User" <mailingl...@mail.com>
Subject [FTP] Create new client for retrieveFileStream()?
Date Sun, 01 May 2016 15:16:02 GMT
I searched Google for examples uses of Apache Commons FTP library, but only found very basic
examples. For efficiency and not to reach user limit, I used only one client.

When I called mlistFile(), I got an "java.lang.ArrayIndexOutOfBoundsException: length=1; index=1."
at
    String entry = getReplyStrings()[1].substring(1); 

I found that at that time, getReplyStrings returned a String array that had only one element,
and it was
    226 Successfully transferred "/somefile.mp4"
instead of the expected
    250-Listing /somefile.mp4
     type=file;size=1834618;modify=20090501101746; /somefile.mp4
    250 End
 
It seems that the response for MLST was mixed with a file close (InputStream.close()) response.
What is the best way to avoid this? Should I use a separate client for retrieveFileStream()?

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message