You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use the following codes to start sftp downloading:
var remoteFile:InputStream?=null
remoteFile = channel?.get(
args["path"] asString,
ProgressMonitor(client.id, "DownloadProgress", eventSink)
)
val buffer =ByteArray(4096)
while (true) {
val count = remoteFile.read(buffer)
if (count ==-1) {
break
}
outputStream.write(buffer, 0, count)
}
the following exception raised sometimes:
Exception java.lang.ArrayIndexOutOfBoundsException:
at java.lang.System.arraycopy
at com.jcraft.jsch.ChannelSftp$2.read (ChannelSftp.java:1359)
at java.io.InputStream.skip (InputStream.java:547)
at com.jcraft.jsch.ChannelSftp$2.read (ChannelSftp.java:1408)
at com.jcraft.jsch.ChannelSftp$2.read (ChannelSftp.java:1336)
The jsch version is 0.2.17.
The text was updated successfully, but these errors were encountered:
I use the following codes to start sftp downloading:
the following exception raised sometimes:
The jsch version is 0.2.17.
The text was updated successfully, but these errors were encountered: