Can you please tell the internal working of ChannelSftp.get( \"file_name\")? Will the use of this function to get a single file from a list of files (600 files
ChannelSftp.get( \"file_name\")
You have to dispose the streams.
Both the FileInputStream in your upload code and the InputStream returned by ChannelSftp.get in your download code.
FileInputStream
InputStream
ChannelSftp.get
See Disposing streams in Java.