commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mailing User" <>
Subject [FTP] Handling the stream from retrieveFileStream()
Date Wed, 04 May 2016 04:33:57 GMT
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:
For additional commands, e-mail:

View raw message