J2SSH - SFTPFile (Error getting file handle)

"Amit Mathur" <[email protected]>
Newsgroups gmane.comp.java.sshtools.user
Message-ID <[email protected]>
Dear Friends:
I am using the J2ssh API, I have written a java code to get an Sftpfile as:

  sftpClient = ssh.openSftpClient();
  List list = sftpClient.ls();
  SftpFile sftpfile = (SftpFile) list.get(2);//get single SftpFile
  SftpFileInputStream br = new SftpFileInputStream(sftpfile);


  when I run, I get following error,
  ++++++++++++++++++++++++++++++++++++++++++
  java.io.IOException: The file does not have a valid handle!


Can somebody help me out..
Thanks in advance !!!



Thanks & Regards,
Amit Mathur
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.