Secure iNet Factory

com.jscape.inet.sftp.v2
Class SftpClient2

java.lang.Object
  extended by com.jscape.inet.sftp.SftpClient
      extended by com.jscape.inet.sftp.v2.SftpClient2
All Implemented Interfaces:
JFileSystem
Direct Known Subclasses:
FsecureClient, SftpClient3

public class SftpClient2
extends SftpClient

The SFTP client version 2.

Version:
1.0
Author:
Alex Usun

Field Summary
static int VERSION
          The client version
 
Constructor Summary
SftpClient2(com.jscape.inet.util.connection.Connection connection, SftpConfiguration config)
          Creates a new client instance.
 
Method Summary
 JFile getFile(JFile parent, java.lang.String child)
          Creates a new JFile instance from a parent abstract pathname and a child pathname string.
 JFile getFile(JFile parent, java.lang.String child, SftpFileAttributes attrs)
          Creates a new JFile instance from a parent abstract pathname and a child pathname string.
 JFile getFile(java.lang.String pathname)
          Creates a new JFile instance by converting the given pathname string into an abstract pathname.
 void rename(java.lang.String oldPath, java.lang.String newPath)
          Renames the file.
 
Methods inherited from class com.jscape.inet.sftp.SftpClient
close, close, containsExtension, create, fstat, getCharset, getConnection, getExtension, getStringExtension, getVersion, isClosed, knowsPacket, lstat, mkdir, open, opendir, read, readdir, realPath, registerPacket, remove, rmdir, sendRequest, setCharset, setFstat, setStat, stat, unregisterPacket, write
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERSION

public static final int VERSION
The client version

See Also:
Constant Field Values
Constructor Detail

SftpClient2

public SftpClient2(com.jscape.inet.util.connection.Connection connection,
                   SftpConfiguration config)
            throws java.io.IOException
Creates a new client instance.

Parameters:
connection - the session connection
config - the configuration
Throws:
SftpException - if an I/O or SFTP error occurs.
java.io.IOException
Method Detail

getFile

public JFile getFile(java.lang.String pathname)
Creates a new JFile instance by converting the given pathname string into an abstract pathname.

Specified by:
getFile in interface JFileSystem
Overrides:
getFile in class SftpClient
Parameters:
pathname - a pathname string
Returns:
a new JFile instance

getFile

public JFile getFile(JFile parent,
                     java.lang.String child)
Creates a new JFile instance from a parent abstract pathname and a child pathname string.

Specified by:
getFile in interface JFileSystem
Overrides:
getFile in class SftpClient
Parameters:
parent - the parent abstract pathname
child - the child pathname string
Returns:
a new JFile instance

getFile

public JFile getFile(JFile parent,
                     java.lang.String child,
                     SftpFileAttributes attrs)
Creates a new JFile instance from a parent abstract pathname and a child pathname string.

Overrides:
getFile in class SftpClient
Parameters:
parent - the parent abstract pathname
child - the child pathname string
Returns:
a new JFile instance

rename

public void rename(java.lang.String oldPath,
                   java.lang.String newPath)
            throws SftpException
Renames the file.

Parameters:
oldPath - the old file path
newPath - the new file path
Throws:
SftpException - if an I/O or SFTP error occurs.

Secure iNet Factory

Copyright © JSCAPE LLC. 1999-2011. All Rights Reserved