You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Mailing User <ma...@mail.com> on 2016/05/04 06:33:57 UTC

[FTP] Handling the stream from retrieveFileStream()

InputStream x = retrieveFileStream();
 
When closing x, I have to call completePendingCommand(). And it seems I cannot retrieve another file stream unless x has been already closed. This makes things complicated when x is used in nested, multi-threaded codes.
 
How do I know if x is open and I need to close x? Or how do I know if the FTPClient has an opened stream? (I may not simply call x.close() again when it has already been closed, because I need to call completePendingCommand() after x.close(), and if x has already been closed, it feels it would cause problems to call completePendingCommand() again.)

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