Secure iNet Factory

com.jscape.inet.sftp.v3
Class SftpClient3

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

public class SftpClient3
extends SftpClient2

The SFTP client version 3.

Version:
1.0
Author:
Alex Usun

Field Summary
static int VERSION
          The client version
 
Constructor Summary
SftpClient3(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.
 java.lang.String readLink(java.lang.String path)
          Obtains the link target.
 void symlink(java.lang.String linkPath, java.lang.String targetPath)
          Creates a new symbolic link.
 
Methods inherited from class com.jscape.inet.sftp.v2.SftpClient2
rename
 
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

SftpClient3

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

Parameters:
connection - the session channel
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 SftpClient2
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 SftpClient2
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 SftpClient2
Parameters:
parent - the parent abstract pathname
child - the child pathname string
attrs - the file attributes
Returns:
a new JFile instance

readLink

public java.lang.String readLink(java.lang.String path)
                          throws SftpException
Obtains the link target.

Parameters:
path - the link path
Returns:
the link target
Throws:
SftpException - if an I/O or SFTP error occurs.

symlink

public void symlink(java.lang.String linkPath,
                    java.lang.String targetPath)
             throws SftpException
Creates a new symbolic link.

Parameters:
linkPath - the link path
targetPath - the link target path
Throws:
SftpException - if an I/O or SFTP error occurs.

Secure iNet Factory

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